Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
CoInitialize has not been called
Message
 
To
27/08/2003 10:04:36
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00823762
Message ID:
00824113
Views:
18
Hi,
Declare Long CoInitialize in ole32 Long lpReserved
Declare Long CoUninitialize in ole32

CoInitialize(0)
...
CoUninitialize()
You must have CoUninitialize() call for each CoInitialize(). However I don't think that you should use these functions directly. COM library must be already initialized by VFP. The problem may be in COM DLL which you are using. Try to test it in VB or somethere else.

>I'm accessing a COM dll from foxpro using CREATEOBJECT(). When I use it from a form (windows application) it works find. I created a Single COM server dll (DEFINE CLASS VFPPROCESS AS CUSTOM OLEPUBLIC) so I can use it from another application. When the foxpro program get to the line where it does CREATEOBJECT I get this error:
>
> OLE error code 0x800401f0: CoInitialize has not been called. 1426
>
>How can I call CoInitialize from the FoxPro COM dll. I'm using Visual FoxPro 7
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform