Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Creating setup disks
Message
 
To
07/02/2002 06:53:44
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00616503
Message ID:
00616614
Views:
18
If I understand you right you use your own setup procedure. For registering OCX (ActiveX) You can use regsvr32 or in your can call DLLRegisterServer procedure.Here you are some example (I download it from here but I can remember the autor of this example :o((()

** RegisterOLEControl( "c:\windows\system\msmapi32.ocx" )

*File: RegisterOLEControl.prg
*-- This function registers an OCX/ActiveX control
* or set of OCX/ActiveX controls based on the name of file.
*-- Note: It works for OLE servers too.

*-- Parameters:
* tcFileName = the name of the file that contains
* the control(s), including the path.
*-- Returns:
* Logical TRUE if successful, FALSE otherwise.
* Also returns FALSE if the file doesn't exist.
*-- Call sample:
* llRegistered = RegisterControl("c:\windows\system\comctl32.ocx")

LPARAMETERS tcFileName
LOCAL llSuccess

llSuccess = .f.

IF FILE( tcFileName )
DECLARE INTEGER DllRegisterServer IN (tcFileName) AS __DllRegisterServer__
*-- This function returns 0 if successful
llSuccess = ( __DllRegisterServer__() = 0 )
ENDIF

RETURN llSuccess


File: UnregisterControl.prg
*-- This function unregisters an OCX/ActiveX control
* or set of OCX/ActiveX controls based on the
* name of file.
*-- Note: It works for OLE servers too.

FUNCTION UnregisterControl
*-- Parameters:
* tcFileName = the name of the file that contains
* the control(s), including the path.
*-- Returns:
* Logical TRUE if successful, FALSE otherwise.
* Also returns FALSE if the file doesn't exist.
*-- Call sample:
* llUnregistered = UnregisterControl("c:\windows\system\comctl32.ocx")

LPARAMETERS tcFileName
LOCAL llSuccess

IF FILE(tcFileName)
DECLARE INTEGER DllUnregisterServer ;
IN (tcFileName) ;
AS __DllUnregisterServer__
*-- This function returns 0 if successful
llSuccess = (__DllUnregisterServer__() = 0)
ENDIF

RETURN llSuccess

HTH

Boris
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Previous
Reply
Map
View

Click here to load this message in the networking platform