VC++ DLL for JDE

jdecoder

jdecoder

Well Known Member
Hi People.
I had created a DLL in VC++ which basically opens JDE instance and has many JDE APIS and structures used for processing. Now I had to mention included/Library directories for JDE from the e900 folder (Find attachment). Now this DLL will be called in VB.NET application. Now everything works fine in the local machine. But when this DLL was taken into a different instance (e900 demo) the DLL seems to fail.

I am not sure if the demo has some issue. Or is it the hard address on the VC++ directories. Also Visual studio has its default directory files having environment variables $(VCInstallDir), $(FrameworkSDKDir) etc… do we have something similar for JDE directory.

We are trying to make an installer package of the VB application which is supposed to run on any client with a JDE FAT in it.

Thanks in advance.
 

Attachments

  • 171046-Include.jpg
    171046-Include.jpg
    219.3 KB · Views: 256
What you say "the DLL seems to fail", what does that mean? Is the app unable to load your DLL? Or is it unable to load the JDE DLLs you are referencing?

Is c:\e900\system\bin32 in your path? (assuming you installed to c:)
 
Hi,
Apologies for the delay. So this is what is actually happening when I place the debug point at DLL invocation it does nothing. Doesn’t even throw an error, just goes into the next line. But I see this in the Output log “system.dllnotfoundexception”

More detail :
I am declaring the DLL as
Private Declare Function MyDLL Lib "<DLL Addr>" ByVal argObjectName As String, ByVal argObjectType As String, ByVal argOutputFile As String, ByVal argOutputPath As String, ByVal argargUser As String, ByVal argPass As String, ByVal argEnv As String) As String

And I invoke it like this :
ReturnVal.Text = MyDLL (ObjectName.Text, ObjectType.Text, OutputFile.Text, OutputPath.Text, UserName.Text, Password.Text, Env.Text)

In the VB project

The DLL address is a static directory. I have tried placing the DLL in C:, Windows, The Bin of the VB project etc… all in vain.

I also happened to look into the system log (eventvwr.msc), there it says “SideBySide” as an error but not sure what that means.

Please throw some light on DLL distribution how it’s done, I have always believed that the DLL shoud be self sufficient.

craig_welton,
It’s a custom DLL that I built and not a JDE standard DLL. Also in my development machine the JDE is installed in D: whereas were I am trying to run the DLL on the DEMO machine the JDE is in the C:

Please let me know in case you need more info.

Thank you
 
What version of Visual Studio did you create the DLL with? Perhaps the other non-working machine needs the VS Redistributable package installed. I believe that clears up some side-by-side issues.
 
Back
Top