How do I load a 32 bit dll into a surrogate process for use in a 64 bit application

869 views Asked by At

I'm trying to start a surrogate process for a legacy dll that I need use, I know I need to run this dll in a surrogate process since it's 32 bit and I can't run this in 64 bit space.

However I'm very confused about how to do this.

CLSID CLSID_x86DLL;
LPCOLESTR converted_cslid = L"{BEB800E3-F4D2-11D1-8B1A-0060B0A32AFE}";
CLSIDFromString(converted_cslid, &CLSID_x86DLL);
HRESULT hResult;

HRESULT hr = CoGetClassObject(CLSID_x86DLL, CLSCTX_LOCAL_SERVER, NULL, IID_IClassFactory, (void**)&hResult);

I thought this should start the surrogate process however it returns "class not registered", but

HINSTANCE hIns = ShellExecute(NULL, "open", "regsvr32", bdcComDLL, NULL, NULL);

should register it? I've also manually went into the registry and added values where I thought they were supposed to be.

How can I get this running in the system-suppilied surrogate? (dllhost.exe)

0

There are 0 answers