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 /

where the switch bypasses a message box helping with security but still shelling out of the present environment. This works smashing otherwise

Thanks in advance

Charlane

RE: Regsvr32 (Kernel32.dll) by Leemi

Leemi
Wed Feb 04 16:21:01 CST 2004

Hi Charlane:

Can you use the Shellexecute or WinExec to call the Regsvr 32?
141551 How to Hide the "FoxPro Run Command" Window in Visual FoxPro
http://support.microsoft.com/?id=141551

193772 HOWTO: Use the _ShellExecute Foundation Class
http://support.microsoft.com/?id=193772

I hope this helps.
This posting is provided "AS IS" with no warranties, and confers no rights.

Sincerely,
Microsoft FoxPro Technical Support
Lee Mitchell

*-- VFP8 HAS ARRIVED!! --*
Read about all the new features of VFP8 here:
http://www.universalthread.com/VisualFoxPro/News/VFP8Release.asp
Purchase VFP8 here:
http://shop.microsoft.com/Referral/Productinfo.asp?siteID=11518

Keep an eye on the product lifecycle for Visual FoxPro here:
http://support.microsoft.com/default.aspx?id=fh;[ln];lifeprodv
- VFP5 Mainstream Support retired June 30th, 2003
- VFP6 Mainstream Support retires Sept. 30th, 2003


>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.

>Thanks in advance.

>Charlane


Re: Regsvr32 (Kernel32.dll) by David

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.