Information générale
Catégorie:
Fonctions Windows API
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
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement