Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Extproc on NT

Extproc on NT

From: <s.sergeyev_at_telesens.com.ua>
Date: 28 Dec 1999 11:17:52 GMT
Message-ID: <84a690$skr$1@news.netmar.com>


Did anyone try to execute NT command line via External Procedures? I tried to do following:
C module:
#include <windows.h>

#define NullValue -1

long __declspec(dllexport) exec(char *cmd) {

	if (_execlp (cmd, cmd, NULL) == -1) return -1;
	return 1;

}

PL/SQL module:
CREATE OR REPLACE LIBRARY OraDos IS 'D:\1\OD\od.dll' /

CREATE OR REPLACE FUNCTION F_OSRUN (cmdin IN VARCHAR2) RETURN BINARY_INTEGER IS
EXTERNAL
        NAME "exec"
   LANGUAGE C

	LIBRARY OraDos
	PARAMETERS (cmdin			STRING);

/

Whn I call this function, I recieve error message ORA-28576: lost RPC connection to external procedure agent and function executes command line, or function does nothing and I recieve no message.
What's wrong?

Received on Tue Dec 28 1999 - 05:17:52 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US