Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Checking for DLL Registration Before Using CreateObject(
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00766669
Message ID:
00766670
Vues:
21
>Hello All,
>
>We have a DLL that we're trying to instantiate using CreateObject() and the instantiation works fine if the DLL is registered on the machine. However, we need to check to see if the DLL is registered on the machine before doing the CreateObject() to prevent the runtime error that occurs if the DLL isn't registered.
>
>Does anyone know how to check this using code? I could use the FILE() function to see if the DLL exists in the System folder, but it still wouldn't ensure that it's registered.
>
>Thanks in advance,
>
Ben,

Check the registry for the ProgID.
* Using the registry class in the FFC
oReg = CREATEOBJECT("Registry")
? oReg.IsKey("MyDll.MyServer")
George

Ubi caritas et amor, deus ibi est
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform