Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
CoInitialize has not been called
Message
 
À
27/08/2003 10:04:36
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00823762
Message ID:
00824113
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform