Information générale
Catégorie:
Codage, syntaxe et commandes
>>How do I access the references collection at runtime?
>>
>>I have a couple of remote components on my references which I want to update to clients whenever I have a new version installed on the server. In order to remove the old components, I have to know the CLSID they are running under to find the uninstall string on the registry.
>>
>>Any ideas will be well received and appreciated.
>
>You can't put a reference at runtime.
>
>Your options are:
>1- Do late binding instead of early binding if your CLSID change
>2- Don't change your component interface and make sure your VB project is set to binary compatibility. When you recompile, VB will keep the same CLSID.
The CLSID of my two components doesn't change, but the interface does. So I don't need to put a reference, just access it and read the FullPath property.
For now I've worked around this by reading the folder name from the C:\Program Files\Remote Applications\ which is the CLSID of my installed remote component.
I would still be interested in knowing if the References collection can be read at runtime. Thanks for your help.
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement