Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Declare in...
Message
From
08/11/2001 10:53:52
Kenneth Downs
Secure Data Software, Inc.
New York, United States
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Declare in...
Miscellaneous
Thread ID:
00579100
Message ID:
00579100
Views:
56
Folks,

Having trouble declaring API functions, in particular printer functions.

First, GetDefaultPrinter is supposed to have a boolean return, but DECLARE DLL does not support keywords BOOLEAN or LOGICAL. I have been using SHORT on the assumption that a C logical is actually an integer.

Second, I cannot figure how to translate MSDN's libraries into the actual "IN..." clause of the Declare DLL command. For instance, GetDefaultPrinter is supposed to be in library Winspool.lib, but:

If I try DECLARE SHORT GetDefaultPrinter In Winspool I get "Cannot open 32-bit library Winspool". Same for "...in Winspool.lib" and "...in Winspool.dll"

If I try Win32api, the declaration fails with "Cannot find entry point..."

If I try User32.dll it will accept the declaration, but fail on the call with "Cannot find entry point..."

Have been very careful about case throughout.

Any help much appreciated
Next
Reply
Map
View

Click here to load this message in the networking platform