Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I register DLL's & OCX's
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00276541
Message ID:
00276660
Vues:
27
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
>I am putting DLL's and OCX files in my program directory to insure that they do not get stepped on, but how do I know when they need to be registered and when they don't?
>
>Also, HOW do I register them from within VFP or from DOS
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform