Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How can I find files that contain a control
Message
 
To
12/12/2000 15:17:06
Randy Riegel
Zimish Contracting
Ohio, United States
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00452472
Message ID:
00452509
Views:
15
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform