Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How do I register DLL's & OCX's
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00276541
Message ID:
00276765
Views:
25
>Joe,
>
>You can also use API calls:
>
>
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,

I never realized this existed. Thanks. I assume, however, that the server must be self-registering in order for this to work. Are all OCXs and OLE servers self-registering by default?

One more question. In the last issue of the MSDN News' Ask Dr. GUI column, there was a question regarding registering ActiveX controls. The problem was that REGSVR32 doesn't work on something like MSCOMM32.OCX because it doesn't extract the runtime license. Does this do that?
George

Ubi caritas et amor, deus ibi est
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform