Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Need to programatically recover from dll mistake!
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00891903
Message ID:
00891915
Vues:
19
This message has been marked as the solution to the initial question of the thread.
>When I release my app, I had all my files (including a dll) in the app's directory. As the app runs, it looks to see if the dll has been registered on the users machine. If it has not, then it registers and then instantiates what it needs.
>
>However, the system admin decided to move the app to a different folder. Now the registry shows that the dll is registered but the path of the dll in the registry is no longer valid ... the dll was moved with the app. So, when the app tries to instantiate the object, it crashes.
>
>What I'd like to do is compare the working path of the running app to the path listed in the registry. If they differ, I could unregister the dll and re-register it. Actually, maybe I could just replace the path value in the registry?
>
>Is there any easy way to get the registered path of the dll? In this case, the path is found in the Registry as:
>
>HKEY_CLASSES_ROOT\CLSID\{832E8CD7-F63C-47AB-8F73-7F41B0FD232E}\InprocServer32
>
>However, I can't seem to figure out how to get the default value from this registry path.
>
>Thanks so much for whatever help you can offer!
>
Rodd,

Get the DLL's CLSID which, in the registry is beneath its ProgID. Then, under HKEY_CLASSES_ROOT\CLSID\< the actual CLSID >\InProcServer32 you'll find the actual path to your server. If it's not the same, the call DllRegisterServer in the VFP DLL. There are a number of samples here on the UT. This will properly re-intialize where the server exists.
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