Kenta

It is not a problem with the routine as such.

There was a similar problem I had with XP SP2, I think.  Something to do 
with changed permissions/rights or whatever.

For some OCXs an upgrade may be an option - Otherwise I believe there is 
a workaround but I am sorry I cannot recall the details - it did not 
take me too long to find the info I needed with Google

HTH

Paul Newton

Kent Belan wrote:
> Hello,
> I just got a new laptop with Vista Home Premium.
> I am new to Vista and testing my applications.
>
> I am having problems registering OCX from within my VFP9 apps.
>
> In XP and before I use the following routine and it works great.
>
> function RegisterOCX
> * This function registers/unregisters an OCX/ActiveX control
> *-- Parameters:
> *      tcFileName = the name of the file that contains
> *                   the control(s), including the path.
> *-- Returns:
> *      Logical TRUE if successful, FALSE otherwise.
> *-- Call sample:
> *      llRegistered = RegisterOCX("c:\windows\system\comctl32.ocx",.T.)
> LParameters tcFileName, tlOnOff
> Local llSuccess
> If File(tcFileName)
>    If tlOnOff
>       Declare Integer DllRegisterServer In (tcFileName) As
> __DllRegisterServer__
>       *-- This function returns 0 if successful
>       Store  __DllRegisterServer__() = 0 To llSuccess
>    Else
>       Declare Integer DllUnRegisterServer In (tcFileName) As
> __DllUnRegisterServer__
>       *-- This function returns 0 if successful
>       Store __DllUnRegisterServer__() = 0 To llSuccess
>    Endif
> Else
>    llSuccess = .F.
> Endif
> Return llSuccess
> endfunc
>
> Needless to say this does not work in Vista.
>
> Does anyone have a routine that works in Vista ?
>
> Thanks,
> Kent
>
>
>
>
[excessive quoting removed by server]

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the 
author, and do not constitute legal or medical advice. This statement is added 
to the messages for those lawyers who are too stupid to see the obvious.

Reply via email to