| Problem while executing a dll throuch External Procedure (merged) [message #449347]
||Mon, 29 March 2010 04:51
Registered: March 2010
I am facing problem while executing a .dll through oracle8i.
1) I have written Test.c program to generate Test.dll
__declspec(dllexport) void BatchExec()
2) Test.bat file is to open IE.
3) I have written BatchTest.cpp to test Test.dll
int APIENTRY WinMain(HINSTANCE hInstance,
// TODO: Place code here.
HINSTANCE hDLL = NULL;
hDLL = LoadLibrary(TEXT("C:\\Test\\Release\\Test.dll"));
typedef void (__stdcall * integers)();
Through the above program I was able to run Test.dll and IE is opening...
4) I am trying to run Test.dll through External procedure as follows,
sql>create or replace library ext_proc as 'c:\Oracle8i\bin\Test.dll';
sql>CREATE OR REPLACE FUNCTION PLS
RETURN BINARY_INTEGER AS
EXTERNAL LIBRARY ext_proc
PARAMETERS (RETURN SHORT);
sql>CREATE OR REPLACE PROCEDURE Use AS
res := PLS;
sql>set serveroutput on
Procedure executed successfully.
After the procedure execution i am not able to see IE. But i can see that in Task Manager\Processes. and extproc is also running. Looks like Test.bat is being executed.!!!
lister.ora and tnsnames.ora configuration looks good.
I was able to execute extern.c which is given in C:\oracle8i\RDBMS\extproc and able to run extern.dll using the procedure given in extern.sql. Finally i was able to find the maximum of two numbers.
Why am i not able to run Test.dll???!!!!
Am i doing anything wrong???
Or cant we open another application through external procedures??
I tried opening Notepad also. But no use....
Please help me out.. I have been working on this since a week. But not able make it work.
Please let me know if you find any changes required.
Thanks in Advance!
[Updated on: Mon, 29 March 2010 08:10]
Report message to a moderator