General information
Category:
Windows API functions
I'm experimenting with the TWAIN_32.DLL and trying to declare the DSM_Entry function - which I believe is the only entry point into the DLL.
The DSM_Entry function expects several arguments, some of which are type structures. I tried to simulate the structures by creating an appropriately sized character string. The documentation for the DLL shows the DSM_Entry function's interface as follows:
UINT16 FAR PASCAL DSM_Entry
(IDENTITY pOrigin,
IDENTITY pDest,
UINT32 DataGroup,
UINT16 ArgType,
UINT16 Message,
MEMREF pData)
where UINT16 is an "unsigned short", UINT32 is an "unsigned long" and IDENTITY is a structure that looks like:
typedef struct {
UINT32 Id; /* Unique number.In Windows, application hWnd*/
VERSION Version;
UINT16 ProtocolMajor;
UINT16 ProtocolMinor;
UINT32 SupportedGroups;
STR32 Manufacturer; /* Manufacturer name, e.g. "Hewlett-Packard" */
STR32 ProductFamily;/* Product family name, e.g. "ScanJet" */
STR32 ProductName; /* Product name, e.g. "ScanJet Plus" */
} IDENTITY, FAR * IDENTITY;
Although there were no visible errors, the DSM_Entry function did not seem to work. If anyone has used this DLL or can provide some information on passing type structures as arguments to DLLs, I'd really appreciate your comments.
Thanks,
Alan
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