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 >David,