David
Wed Feb 04 19:36:33 CST 2004
Charlane,
*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
--
df - Microsoft MVP FoxPro
http://www.geocities.com/df_foxpro
"Charlane" <anonymous@discussions.microsoft.com> wrote in message
news:5A216451-0325-4A00-B4F8-8389B750521C@microsoft.com...
> I have read some of this elsewhere on forums in VB. Has anyone seen code
that I can declare in VFP to call regsvr32 without having to shell out to
register a dll?
>
> Presently my line of code reads:
>
> RUN REGSVR32 HASHCTL.DLL /S
>
> where the switch bypasses a message box helping with security but still
shelling out of the present environment. This works smashing otherwise.