ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Effective Interop with Managed C++
Subject:   Some concerns with managed C++ in the dot net 1.1 framework
Date:   2003-08-13 01:27:16
From:   anonymous2
Response to: Some concerns with managed C++ in the dot net 1.1 framework

Dave,


Try using the System data-types instead (same code change as required to pass refs).
Instead of:
double *d = new double[10];
use
System::Double d[] = new System::Double[10];


The exit/atexit problem... a DLL would link to different CRTs than the executable running it, so you would have to some-how get hold of the executable's _exit() function, and link to it from your DLL, if your DLL needs to exit.


Try using the System method for exiting an Application. Although, using C/C++ libraries would still have a problem if you use the .h/.lib method to compile and link.


Cheers,


Dave