General information
Category:
COM/DCOM and OLE Automation
*File: RegisterControl.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.
FUNCTION RegisterControl
*-- 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
IF FILE(tcFileName)
DECLARE INTEGER DllRegisterServer ;
IN (tcFileName) ;
AS __DllRegisterServer__
*-- This function returns 0 if successful
IF __DllRegisterServer__() = 0
llSuccess = .T.
ELSE
llSuccess = .F.
ENDIF
ELSE
llSuccess = .F.
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
IF __DllUnregisterServer__() = 0
llSuccess = .T.
ELSE
llSuccess = .F.
ENDIF
ELSE
llSuccess = .F.
ENDIF
RETURN llSuccess
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only