Singleton in native library with C++/CLI
Tech-Archive recommends: Speed Up your PC by fixing your registry
- From: "Adrian" <a@xxxxx>
- Date: Tue, 11 Jul 2006 22:59:12 +0100
Hi,
I have a large unmanaged static C++ library which I've wrapped using a small
C++/CLR DLL. This is called from a C# client application.
The static library has a singleton, however it appears that it is being
instantiated twice. The first instantiation is down to me calling
singleton.instance() in the C++/CLR DLL, the second instantiation is down to
the library internally calling singleton.instance().
I'm relatively new to C++/CLR, is this expected behaviour and is there
anything I can do to work around this?
Thanks,
Adrian
.
Relevant Pages
- Re: msvcp90d.dll and msvcr90d.dll
... the reason why put commonly used template parameter ... instantiation into DLL is to save the size of client application? ... (microsoft.public.vc.language) - Re: How to get dialog size?
... You don't care what size it was at design time, ... told this DLL is a ActiveX control. ... CAxWindow ax; ... You need to get the dialog at its point of instantiation to find out its size, ... (microsoft.public.vc.mfc) - Re: How to pass object from dll to exe? error <98>
... have ensured the loading of your Dll into the Acad- ... For your Acad-Main-Dll that means, ... wich the Main-Dll-Class loads (after instantiation of itself ... the same hosting Acad-Process - no marshalling would ... (microsoft.public.vb.general.discussion) - Re: How to pass object from dll to exe? error <98>
... have ensured the loading of your Dll into the Acad- ... For your Acad-Main-Dll that means, ... wich the Main-Dll-Class loads (after instantiation of itself ... the same hosting Acad-Process - no marshalling would ... (microsoft.public.vb.general.discussion) - Re: ActiveX component cant create object error in Console Application
... Have you deployed the Interop DLL that DLL is ... the way for .NET runtime to call into COM. Can you get the error code ... returned from the instantiation call. ... the COm dll is registered on the deployment server. ... (microsoft.public.dotnet.framework.interop) |
|