Re: [BLACKBOX] Calling DLL's

From: [at]} <Rainer>
Date: Tue, 12 Jan 2010 09:30:39 +0100


A call to "apiInit" (being exported from ew.dll) returns the error message "JNI,initVM,JNI_CreateJavaVM,"

I guess the DLL ew.dll in turn calls some java DLL's to start up a java virtual machine and the java DLL runs into a problem. But this is just a guess because I am not experienced in all this java stuff and windows programming as well.

I will try to contact the vendor of ew.dll to ask for the precise meaning of the error message but I guess he will tell me his test application "testClient.exe" works and he does not know what BlackBox is at all.

What I am concerned about is the fact that the java stuff gets started without any problem when the call to "apiInit" is executed within the test application "testClient.exe". This is a compiled and linked .exe-file. Could there be any difference in the way of calling DLL*s from .exe-files and from BlackBox ?


Some more information, which could be of interest:

ew.dll exports services having parameters of complex types (arrays of records which contain integers, strings, etc).
To make the handling of these types easier a colleague of mine has developed an "interface dll", say trace.dll.
trace.dll is intended to sit on top of ew.dll and he built a small dos application for testing trace.dll.

Running this test application calls trace.dll which in turn calls "apiInit". Everything works fine.

I tried to do the same with BlackBox. I am able to call trace.dll within BlackBox; trace.dll in turn calls "apiInit" and "apiInit" fails with the same error message.


This confuses me because I have no idea where the difference is. Everything works when calling "apiInit" from a compiled and linked C program. On the other side "apiInit" gets an internal problem when being called from BlackBox in spite of the fact parameter passing between BlackBox and "apiInit" seems to work.

My colleague told he has linked ew.lib to his program. He told, in windows programming dll files come together with lib files.
These lib files are intended to be linked statically to the application and their purpose is to make references to procedures within dll's easier. Could this result in a different mechanism of calling dll's from .exe files and from BlackBox ?

Some paths need to be added to the environment variable "path" in order to get the java stuff working. I modified the setting of "path" from within BlackBox (via calling WinApi) to make sure the process "blackbox.exe" is able to see the correct setting. But this did not help either.


Does anybody have an idea what the problem is ?
Does anybody have a hint where to look or what to look for ?


Best regards,
Rainer


Am 11.01.2010 um 18:55 schrieb Alexander Iljin:


Hello!


 When I call "apiInit" from BlackBox, the DLL is found by the system,
 "apiInit" starts, takes its input parameter (options file), reads
 this file, writes a log file specified in the options file and
 terminates delivering an error code and an error message.



  What is the error message?

---=====---
 Alexander


----
To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy---- To unsubscribe, send a message with body "SIGNOFF BLACKBOX" to LISTSERV{([at]})nowhere.xy
Received on Tue Jan 12 2010 - 09:30:39 UTC

This archive was generated by hypermail 2.3.0 : Thu Sep 26 2013 - 06:30:37 UTC