Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Creating a reference with code ~Need help~
Message
Information générale
Forum:
Visual Basic
Catégorie:
Fonctions API de Windows
Divers
Thread ID:
00274231
Message ID:
00274243
Vues:
32
>I need to create a reference to a registered dll object with code. The issue is that I have two very similar libraries with internal structure duplication so I cant use the project/reference -> Object method. I need to be able to switch from one to the other at runtime.
>

Declare a variable as an object and use the CreateObject statement like this:

Dim x As Object

If Condition1 Then
Set x = CreateObject("DLL1")
Else
Set x = CreateObject("DLL2")
End If
É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