Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DECLARE - DLL
Message
 
 
To
23/03/1998 15:06:40
Dan Thomas
ACS Firehouse Solutions
Urbandale, Iowa, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Miscellaneous
Thread ID:
00086514
Message ID:
00086518
Views:
25
>Is it best to declare all api functions I will be using "up-front" in the app, or only declare them as I need to? I have a winapi class, and am declaring all my api functions in the class init code. I could move the individual declares to the appropriate methods but then the declare would execute each time the method was called. I am declaring a bunch of functions (roughly 20 or so). Any comments/suggestions?

Like anything, I think it is a matter of preference. In your situation, I would write a class that encapsulates the the API calls. Then, in your app, where you make those API calls - make method calls to your class instead. When the class is instanced, the Init() will take care of the declares. To make things easier, yoiu may want to instance the class at the top of your app.
Previous
Reply
Map
View

Click here to load this message in the networking platform