Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Extproc on NT
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?
![]() |
![]() |