Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting registered functions
Message
From
09/06/1999 01:25:04
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00227758
Message ID:
00227777
Views:
21
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform