I'm using a managed Custom Action hosting the CLR from a c++ dll using wix .
That works great except when I need to use the Custom Action more than once
cause in that case it crashes. After some debuging I found that the error
raises when I call the method CreateDomainSetup(&pDomainSetupPunk) from
ICorRuntimeHost for the second time. My question is how can I check that the
Domain Setup hasn't been created so I dont have to call CreateDomainSetup
and load the pDomainSetupPunk pointer?
This is my code:
CComPtr<IUnknown> pDomainSetupPunk;
CComPtr<IAppDomainSetup> pDomainSetup;
CComPtr<IUnknown> pLocalDomainPunk;
TCHAR szDirectory[MAX_PATH + 1];
// Create an AppDomainSetup with the base directory pointing to the
// location of the managed DLL. The assumption is made that the
// target assembly is located in the same directory
IfFailGo( m_pHost->CreateDomainSetup(&pDomainSetupPunk) );
IfFailGo( pDomainSetupPunk->QueryInterface(__uuidof(pDomainSetup),(LPVOID*)
&pDomainSetup) );
dgutride@gmail.com - 29 Mar 2006 20:43 GMT
erickvch:
I've noticed this same problem in my msi. I assume you are using WiX
and calling the custom action either on a page next or from a button
somewhere. Have you made any progress with this problem yet? Now that
you've pointed me to the function that is crashing, I'm going to start
doing some more research on this.
Thanks,
Dana