[Migrated content. Thread originally posted on 18 May 2007]
I wrote a dll in VB.NET (using Visual Studio 2005) to do print preview and printing functions. I am able to access the DLL when called from other .NET programs, and tried to get it to work from the AcuGT 7.2.0 runtime. I ran into a few issues with registering assemblies and whatnot, but now I am stuck with the following message "LoadEntity invoke failed". I haven't got a clue how to troubleshoot this, since I can't seem to step through any of this in debug mode. I have a call in to the tech support, but they told me that .NET2.0 isn't supported (hasn't it been out about 2 years now?), and also haven't responded to me yet.... So, I'm hoping someone here will know what I'm doing wrong. I also tried compiling the DLL under version 1.1 of the framework, and get the same error (for the purposes of testing, all the DLL does is open MSGBOX). When I start from the command line, if I don't have a .config file in the bin folder specifying the 1.1 version of the framework, I get an error on mscorwks.dll. I CAN, however, get to the same place in the program (and the same error), using version 2.0 of the framework, if I start my COBOL program using wrunnet.dll from a .NET2.0 program.I apologize for the somewhat rambling post, but it's still early in the morning :D
Here is a snippet of the relevant definition of the DLL, created by NETDEFGEN:
OBJECT @ASSEMBLY
NAME "@VBPrint"
VERSION "1.0.2693.32016"
CULTURE "neutral"
STRONG "null"
* FULLY-QUALIFIED-NAME CFDataSystems.CallFunctions, VBPrint, Version=1.0.2693.32016, Culture=neutral, PublicKeyToken=null
* CFDataSystems.CallFunctions
NAMESPACE "CFDataSystems"
CLASS "CallFunctions"
MODULE "vbprint.dll"
CONSTRUCTOR, 0, @CONSTRUCTOR1
CONSTRUCTOR, 0, @CONSTRUCTOR2
* Void TestStartFunction()
METHOD, 0, "@TestStartFunction"
Here is the COBOL call:
CREATE "VBPrint"
NAMESPACE is "CFDataSystems",
CLASS-NAME is "CallFunctions",
HANDLE is vbprint-handle.
modify vbprint-handle "TestStartFunction"().
DESTROY vbprint-handle.
Thanks in advance,
-Chris



