Environment versions
Network:
Windows 2003 Server
Hi David,
This works for me.
IF !THISFORM.chkclass("mscomctl2.dtpicker")
* control not registered - copy the control to Sys32 and register it
IF MESSAGEBOX("Some PPAgent components are not registered, would you like to register them now?",36,"PPAgent Warning") = 6
* try and register the control
* copy the file to the windows\sys32 folder
lcWindir = ADDBS(THISFORM.getwindir())
IF !FILE((lcWindir + "mscomct2.ocx"))
COPY FILE (ADDBS(THISFORM.appdir) + "mscomct2.ocx") TO (lcWindir+"mscomct2.ocx")
ENDIF
IF !THISFORM.regclass(lcWindir+"mscomct2.ocx")
lcMsg = "Unable to register key components please contact Infosupport."
ENDIF
ELSE
lcMsg = "PPAgent cannot load as some components are not registered."
ENDIF
ENDIF
** chkclass
PARAMETERS p_class
#DEFINE HKEY_CLASSES_ROOT -2147483648
#DEFINE ERROR_SUCCESS 0 && OK
IF EMPTY(p_class)
RETURN .F.
ENDIF
LOCAL lnKey
DECLARE Integer RegOpenKey IN Win32API ;
Integer nHKey, String @cSubKey, Integer @nResult
DECLARE Integer RegCloseKey IN Win32API ;
Integer nHKey
lnKey = 0
llRetVal = ( RegOpenKey(HKEY_CLASSES_ROOT, p_class, @lnKey) = ERROR_SUCCESS )
IF llRetVal
RegCloseKey(lnKey)
ENDIF
HTH
Jon
>My application uses an ActiveX control. When I put the application on all the computers in the office how can I register or be sure the ActiveX control will work on each computer. Thanks.
Previous
Next
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