Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using TWAIN_32.DLL
Message
From
24/04/2002 23:32:57
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Using TWAIN_32.DLL
Miscellaneous
Thread ID:
00648973
Message ID:
00648973
Views:
118
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
Map
View

Click here to load this message in the networking platform