Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How to check that a OLE server was correctly instanciate
Message
Information générale
Forum:
Visual Basic
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00338617
Message ID:
00338690
Vues:
18
>Thanks for your reply Éric, I've modified my code to use the method you've showed.
>
>Is there another way of verifying that the DLL instanciated correctly other than using On Error? In VFP, I would do the following:
>
>
loDLL = NewObject("DEXLink.DEXLink")
>
>IF VarType(loDLL) <> "O"
>   *-- Error message goes here
>ENDIF
No, because as soon as you check the object, it will create the instance.

>In VB, I get an error on the second line:
>
Dim loUtility As dexutility.dexutility   '<-- OK
>Set loUtility = New dexutility.dexutility   '<-- Error
Which error? Why does your component name and your class name the same? Did you create the component yourself? If so, what is the instancing property value?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform