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:
00274421
Vues:
31
>>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

'***********
I tried the following only to get the "error '463' Class not registered on local machine" I regserv32 uninstalled the dll and reinstalled it... MetaFile is the class name that shows up when i use the project/reference -> Object method. How can I find out what it wants as the class name. Any ideas?
    Dim objBlankForm As Object
    Set objBlankForm = CreateObject("MetaFile", "C:\xe\bform1999.dll")
~Joe Johnston USA

"If ye love wealth better than liberty, the tranquility of servitude better than the animated contest of freedom, go home from us in peace. We ask not your counsel or arms. Crouch down and lick the hands which feed you. May your chains set lightly upon you, and may posterity forget that ye were our countrymen."
~Samuel Adams

Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform