RemObjects SDK, EOleError with message ‘Could not obtain OLE control window handle’ in Delphi

1k Views Asked by At

I'm trying to create a Delphi RemObjects SDK Combo Service/Standalone project.

I could put an ActiveX control on the form. But If run it, it crashes with an error message, "Project NewProjectClient.exe raised exception class EOleError with message 'Could not obtain OLE control window handle'.".

What is going wrong?

Thanks.

1

There are 1 best solutions below

0
Stijn Sanders On

Any application that wants to use COM/ActiveX/OLE, must call CoInitialize or CoInitializeEx at least once, ideally during start-up. (Or OleInitialize which itself calls CoInitialize)