Information générale
Catégorie:
COM/DCOM et OLE Automation
Versions des environnements
*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
Précédent
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement