Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I would swear I had this working on a vista64 machine last year but now with that box gone and just windows 7 64bit here to test on I am having a problem with CoCreateInstance of an OUT-OF-PROCESS 32 bit vb6 activex EXE file in the 64bit environment.
CLSIDFromProgID returns S_OK and the clsid returned is correct but CoCreateInstance is failing returning hr = 0x800a0153.

Tell me there is a way to make this work. :-) The calling app is a 64 bit one btw.



CLSID clsid;
hr = CLSIDFromProgID(CONSOLE_PROGID,&clsid);
IUnknown* pUnk;


hr = CoCreateInstance( clsid,
                         NULL,
                         CLSCTX_SERVER,
                         IID_IUnknown,
                         (void**) &pUnk);
Posted

1 solution

Try adding CLSCTX_ACTIVATE_32_BIT_SERVER[^]

Best regards
Espen Harlinn
 
Share this answer
 
Comments
Ron Anders 30-Oct-11 18:53pm    
Class not registered.
Ron Anders 30-Oct-11 19:13pm    
Gives me hope though. I didn't know about that enum.
I will google and try harder with that solution.

Thank you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900