[DllImport("twain_32.dll", EntryPoint="#1")]
static extern TwRC DSMparent( [In, Out] TwIdentity origin, IntPtr zeroptr, TwDG dg, TwDAT dat, TwMSG msg, ref IntPtr refptr );
Declare Function DSMparent Lib "twain_32.dll" (TODO) As TODO
enum TwRC : short
{
Success = 0x0000,
Failure = 0x0001,
CheckStatus = 0x0002,
Cancel = 0x0003,
DSEvent = 0x0004,
NotDSEvent = 0x0005,
XferDone = 0x0006,
EndOfList = 0x0007,
InfoNotSupported = 0x0008,
DataNotAvailable = 0x0009
}
[StructLayout(LayoutKind.Sequential, Pack=2, CharSet=CharSet.Ansi)]
class TwIdentity
{
public IntPtr Id;
public TwVersion Version;
public short ProtocolMajor;
public short ProtocolMinor;
public int SupportedGroups;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=34)]
public string Manufacturer;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=34)]
public string ProductFamily;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst=34)]
public string ProductName;
}
enum TwDG : short
{
Control = 0x0001,
Image = 0x0002,
Audio = 0x0004
}
enum TwDAT : short
{
Null = 0x0000,
Capability = 0x0001,
Event = 0x0002,
Identity = 0x0003,
Parent = 0x0004,
PendingXfers = 0x0005,
SetupMemXfer = 0x0006,
SetupFileXfer = 0x0007,
Status = 0x0008,
UserInterface = 0x0009,
XferGroup = 0x000a,
TwunkIdentity = 0x000b,
CustomDSData = 0x000c,
DeviceEvent = 0x000d,
FileSystem = 0x000e,
PassThru = 0x000f,
ImageInfo = 0x0101,
ImageLayout = 0x0102,
ImageMemXfer = 0x0103,
ImageNativeXfer = 0x0104,
ImageFileXfer = 0x0105,
CieColor = 0x0106,
GrayResponse = 0x0107,
RGBResponse = 0x0108,
JpegCompression = 0x0109,
Palette8 = 0x010a,
ExtImageInfo = 0x010b,
SetupFileXfer2 = 0x0301
}
enum TwMSG : short
{ // MSG_.....
Null = 0x0000,
Get = 0x0001,
GetCurrent = 0x0002,
GetDefault = 0x0003,
GetFirst = 0x0004,
GetNext = 0x0005,
Set = 0x0006,
Reset = 0x0007,
QuerySupport = 0x0008,
XFerReady = 0x0101,
CloseDSReq = 0x0102,
CloseDSOK = 0x0103,
DeviceEvent = 0x0104,
CheckStatus = 0x0201,
OpenDSM = 0x0301,
CloseDSM = 0x0302,
OpenDS = 0x0401,
CloseDS = 0x0402,
UserSelect = 0x0403,
DisableDS = 0x0501,
EnableDS = 0x0502,
EnableDSUIOnly = 0x0503,
ProcessEvent = 0x0601,
EndXfer = 0x0701,
StopFeeder = 0x0702,
ChangeDirectory = 0x0801,
CreateDirectory = 0x0802,
Delete = 0x0803,
FormatMedia = 0x0804,
GetClose = 0x0805,
GetFirstFile = 0x0806,
GetInfo = 0x0807,
GetNextFile = 0x0808,
Rename = 0x0809,
Copy = 0x080A,
AutoCaptureDir = 0x080B,
PassThru = 0x0901
}
None.
Please add some!
Please add some!
Do you know one? Please contribute it!