Quantcast
Channel: Visual COBOL - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 4356

Managed Calling Native

$
0
0

Hi,

currently I am playing aroung with the pinvoke ( demonstrating to call a native program from a managed application) sample as follows:

I created a Native DLL Project (SUBS.DLL, containing 3 Programs based on SUB.CBL

I added the generated DLL into the references of PINVOKE.

I get an Error whe calling the DLL , unless I activate the 'Copy Local' Flag in the references properties.
This took me a while to figure out but ok, its  solved.

Now I can run pinvoke from the IDE, but when i start it from the Command Line in the ...\bin\Debug directory, I see nothing but a litany of errors about BadImageFileFormat and Missing Assemblymanifest in SUBS.DLL.

I have attached the project, for anyone who is willing to take a look at it.
- Thanks in advance

I'm shure this is a pretty basic 'newbie' topic, but still I hope someone can point me the right direction.

Also I would like to know whether it is possible to - say compile the 3 programs mentioned above, each one into its own dll and call them without the need of creating a reference in the project file of the calling program.
Actually this is how we operate on AcuCobol, and I would be glad to find a way to keep it so.

regards,
lukas
.

 


Viewing all articles
Browse latest Browse all 4356

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>