Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I find files that contain a control
Message
 
À
12/12/2000 15:17:06
Randy Riegel
Zimish Contracting
Ohio, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Contrôles ActiveX en VFP
Divers
Thread ID:
00452472
Message ID:
00452509
Vues:
16
>I have an app written in VFP 6.0 that is going to be run over our network. The EXE will reside on a network drive. I have the MS MonthView control in the app and I need to know which OCX file to register on everyones computer. Is there an easy way to find out which OCX contains a certain control?
>
Randy,

Try the following. Pass it the OLEClass name that appears in the properties window
* Function: GetSrvr.prg
* Author: George Tasker
* Date: July 19, 2000 - 11:45 AM
* Purpose: Retrieves the file location
* of an in process OLE automation server

LPARAMETER pcServer

#INCLUDE REGISTRY.H
LOCAL oReg, lcresult, lcCLSID, lnerr
lcresult = ""
SET CLASSLIB TO REGISTRY ADDITIVE
oReg = CREATEOBJECT('Registry')
RELEASE CLASSLIB REGISTRY
IF oReg.OpenKey(pcServer + '\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
      lcresult = ""
      = oReg.GetKeyValue('', @lcresult)
      oReg.CloseKey()
    ENDIF
  ENDIF
  oReg.CloseKey()
ENDIF
RETURN lcresult
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform