General information
Category:
Windows API functions
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only