Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DLL and registry
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00394295
Message ID:
00394312
Vues:
11
>Is there any way to find a location DLL was registred from?
>Thanks Mark

Mark,

The following should work:
#INCLUDE REGISTRY.H
SET CLASSLIB TO REGISTRY ADDITIVE
oReg = CREATEOBJECT('REGISTRY')
RELEASE CLASSLIB REGISTRY
* lcServer is server Object - (ie. mydll.myserver)
IF oReg.OpenKey(lcserver + '\CLSID') = ERROR_SUCCESS
  lcCLSID = ""
  lnerr = oReg.GetKeyValue("", @lcCLSID)
  IF lnerr = ERROR_SUCCESS
    oReg.CloseKey()
    lckey = "Software\Classes\CLSID\" + lcCLSID + "\InProcServer32"
    IF oReg.OpenKey(lckey, HKEY_LOCAL_MACHINE) = ERROR_SUCCESS
      lcdll = ""
      lnerr = oReg.GetKeyValue("", @lcdll)
      IF lnerr = ERROR_SUCCESS
        ? lcdll
      ELSE
        ? lnerr
      ENDIF
      oReg.CloseKey()
    ELSE
      ? "Can't open CLSID key"
    ENDIF
  ELSE
    ? lnerr
  ENDIF
  oReg.CloseKey()
ELSE
  ? "Can't open key"
ENDIF
Will this work for you?
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