Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Register a new activex
Message
 
To
10/07/2000 18:12:20
General information
Forum:
Visual FoxPro
Category:
ActiveX controls in VFP
Miscellaneous
Thread ID:
00390527
Message ID:
00392271
Views:
9
Hi Mauricio,

Here some code that I download from this thread (sorry I can't remember the number of thread and his autor) so that is not my code:


** 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