Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting registered functions
Message
From
09/06/1999 20:51:09
 
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00227758
Message ID:
00228200
Views:
24
>You're preaching to the choir here! If you take a look at all three of my downloadable files here on UT, you'd see that's exactly what I do.
>
>The important problem here in all likelihood is to only call the initialization entrypoint once, and wrapping the API use within an object accomplishes that - if the object is scoped globally and doesn't get released or (or the parent doesn't do a RemoveObject), the visible presense of that object within the app, does accomplish this task.

And this is exactly what I want to say that it's not good. :) If the DECLAREs are done only when the object is instantiated, than, there's no assurance that the functions are still available when they are used (because any other piece of code can issue a CLEAR DLLS between the moment when the functions are declared and the moment they are used). It's true that the object doesn't get released, but this doesn't mean the dll functions it declared are still declared.

>I've never seen a situation where redeclaring an API call in DECLARE...DLL did anything bad, but since I don't know the specifics of the .DLL in question, I'll let the guy who's got the docs tell me the conditions of contest!

Basically, it's just the otherhead of one more VFP DECLARE command. Nothing wrong can happen from the dll, because DECLARE doesn't execute any code in the dll.

Vlad
Previous
Reply
Map
View

Click here to load this message in the networking platform