   Exporting a C++ class to .NET
  Heya!Im trying to export a class in a DLL to .NET. Basically this works nice if i choose "CLR-Class library" but i want to have the DLL completly unmanaged. I made my first attempts and successfully exported a COM-coclass with an interface to a DLL using an IDL typelib. It works to exchange methods, events, ...But there is a problem:I dont want to set up all that things to the registry, providing DllGetClassObject and all the COM-overhead. Basically id like to have it pretty similar to how its done when i use the "CLR-Class library" projecttemplate from VC++. It creates one DLL with typelib and code and you can add this DLL as a reference. It has no setup in the registry and it can do more as a COM-coclass (like having a constructor with parameters).Does anyone of you know how i could producse something similar just with unmanaged code?GreetingsPlerion   
Quote:Does anyone of you know how i could producse something similar just with unmanaged code?Create a regular, native DLL and use Platform Invoke to hook up the native functions from that DLL to your managed code. Note that this means you can only expose functions, not actual classes (you need to provide a C-like interface from your native DLL, basically).If you want to expose actual classes, C++/CLI is your only option (that's the CLR Class Library project you already tried)   