Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Detecting registered functions
Message
De
09/06/1999 01:25:04
 
 
À
09/06/1999 01:19:01
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00227758
Message ID:
00227777
Vues:
22
>The DECLAREs will occur exactly once, when the object is instantiated from the class; if the object is scoped globally to the app (either added to a common VFP object like _SCREEN via ADDOBJECT(), or created as a PUBLIC variable, then you can simply check if the object exists and create it if it doesn't:

This method has one weakness: any CLEAR DLLS as well as any other DECLARE of the same function but with different name/paras/return_value will break it. EVen if it works today with the existing code, nobody can be sure that future code (in-house or third-party) will not break it.

So, DECLARE any dll function where/when it is used. The overhead is minimal. The advantage is, as always, solid code.

Vlad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform