mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-20 19:28:04 +08:00
Updated internal pinvoke names.
This commit is contained in:
@@ -75,9 +75,9 @@
|
||||
<Compile Include="Triplets\DGControl\DGControl.Callback2.cs" />
|
||||
<Compile Include="Triplets\DGImage\DGImage.Filter.cs" />
|
||||
<Compile Include="Triplets\OpBase.cs" />
|
||||
<Compile Include="Triplets\PInvoke.Linux.cs" />
|
||||
<Compile Include="Triplets\PInvoke.Win32.cs" />
|
||||
<Compile Include="Triplets\PInvoke.Win64.cs" />
|
||||
<Compile Include="Triplets\Dsm.Linux.cs" />
|
||||
<Compile Include="Triplets\Dsm.WinOld.cs" />
|
||||
<Compile Include="Triplets\Dsm.WinNew.cs" />
|
||||
<Compile Include="TwainSessionExtensions.cs" />
|
||||
<Compile Include="TwainSession.cs" />
|
||||
<Compile Include="TwainSessionWPF.cs" />
|
||||
@@ -121,7 +121,7 @@
|
||||
<Compile Include="Triplets\DGImage\DGImage.JpegCompression.cs" />
|
||||
<Compile Include="Triplets\DGImage\DGImage.Palette8.cs" />
|
||||
<Compile Include="Triplets\DGImage\DGImage.RgbResponse.cs" />
|
||||
<Compile Include="Triplets\PInvoke.cs" />
|
||||
<Compile Include="Triplets\Dsm.cs" />
|
||||
<Compile Include="TwainException.cs" />
|
||||
<Compile Include="TwainSessionOld.cs" />
|
||||
<Compile Include="Values\DataValues.cs" />
|
||||
|
@@ -18,7 +18,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get);
|
||||
IntPtr z = IntPtr.Zero;
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref z);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref z);
|
||||
}
|
||||
}
|
||||
}
|
@@ -18,7 +18,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(6, 7, DataGroups.Audio, DataArgumentType.AudioInfo, Message.Get);
|
||||
info = new TWAudioInfo();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(ref IntPtr handle)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Audio, DataArgumentType.AudioNativeXfer, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Audio, DataArgumentType.AudioNativeXfer, Message.Get, ref handle);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Audio, DataArgumentType.AudioNativeXfer, Message.Get, ref handle);
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,7 +17,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode RegisterCallback(TWCallback callback)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Callback, Message.RegisterCallback);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.RegisterCallback, callback);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.RegisterCallback, callback);
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,7 +17,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode RegisterCallback(TWCallback2 callback)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Callback, Message.RegisterCallback);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.RegisterCallback, callback);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.RegisterCallback, callback);
|
||||
}
|
||||
}
|
||||
}
|
@@ -18,7 +18,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -29,7 +29,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetCurrent(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.GetCurrent);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetCurrent, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetCurrent, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -40,7 +40,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetDefault(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.GetDefault);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +52,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetHelp(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetHelp);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetHelp, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetHelp, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -64,7 +64,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetLabel(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetLabel);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetLabel, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetLabel, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -76,7 +76,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetLabelEnum(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetLabelEnum);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetLabelEnum, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetLabelEnum, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -87,7 +87,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode QuerySupport(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.QuerySupport);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.QuerySupport, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.QuerySupport, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -99,7 +99,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Reset(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.Reset);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -111,7 +111,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode ResetAll(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.ResetAll);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ResetAll, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ResetAll, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -126,7 +126,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.Capability, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -140,7 +140,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode SetConstraint(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.SetConstraint);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.SetConstraint, capability);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.SetConstraint, capability);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.CustomDSData, Message.Get);
|
||||
customData = new TWCustomDSData();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, customData);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, customData);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWCustomDSData customData)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.CustomDSData, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, customData);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, customData);
|
||||
}
|
||||
}
|
||||
}
|
@@ -14,7 +14,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
|
||||
sourceDeviceEvent = new TWDeviceEvent();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, sourceDeviceEvent);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, sourceDeviceEvent);
|
||||
}
|
||||
}
|
||||
}
|
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.EntryPoint, Message.Get);
|
||||
entryPoint = new TWEntryPoint();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, entryPoint);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, entryPoint);
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,7 +23,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode ProcessEvent(TWEvent theEvent)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Event, Message.ProcessEvent);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ProcessEvent, theEvent);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ProcessEvent, theEvent);
|
||||
}
|
||||
}
|
||||
}
|
@@ -22,7 +22,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode AutomaticCaptureDirectory(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.AutomaticCaptureDirectory);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.AutomaticCaptureDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.AutomaticCaptureDirectory, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -37,7 +37,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode ChangeDirectory(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.ChangeDirectory);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ChangeDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ChangeDirectory, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -53,7 +53,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Copy(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Copy);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Copy, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Copy, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -65,7 +65,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode CreateDirectory(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.CreateDirectory);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.CreateDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.CreateDirectory, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -78,7 +78,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Delete(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Delete);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Delete, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Delete, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -90,7 +90,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode FormatMedia(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.FormatMedia);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.FormatMedia, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.FormatMedia, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -103,7 +103,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetClose(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetClose);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetClose, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetClose, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -115,7 +115,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetFirstFile(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetFirstFile);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetFirstFile, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetFirstFile, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -128,7 +128,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetInfo(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.FileSystem, Message.GetInfo);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetInfo, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetInfo, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -140,7 +140,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetNextFile(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetNextFile);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetNextFile, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetNextFile, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -156,7 +156,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Rename(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Rename);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Rename, fileSystem);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Rename, fileSystem);
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
internal ReturnCode CloseDS()
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Identity, Message.CloseDS);
|
||||
var rc = PInvoke.DsmEntry(Session.GetAppId(), Message.CloseDS, Session.SourceId);
|
||||
var rc = Dsm.DsmEntry(Session.GetAppId(), Message.CloseDS, Session.SourceId);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeSourceId(null);
|
||||
@@ -38,7 +38,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetDefault);
|
||||
source = new TWIdentity();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Message.GetDefault, source);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Message.GetDefault, source);
|
||||
}
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetFirst);
|
||||
source = new TWIdentity();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Message.GetFirst, source);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Message.GetFirst, source);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -65,7 +65,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetNext);
|
||||
source = new TWIdentity();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Message.GetNext, source);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Message.GetNext, source);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -76,7 +76,7 @@ namespace NTwain.Triplets
|
||||
internal ReturnCode OpenDS(TWIdentity source)
|
||||
{
|
||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Identity, Message.OpenDS);
|
||||
var rc = PInvoke.DsmEntry(Session.GetAppId(), Message.OpenDS, source);
|
||||
var rc = Dsm.DsmEntry(Session.GetAppId(), Message.OpenDS, source);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeSourceId(source);
|
||||
@@ -95,7 +95,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWIdentity source)
|
||||
{
|
||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Identity, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Message.Set, source);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Message.Set, source);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -108,7 +108,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.UserSelect);
|
||||
source = new TWIdentity();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Message.UserSelect, source);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Message.UserSelect, source);
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,7 +23,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode CloseDsm(IntPtr handle)
|
||||
{
|
||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Parent, Message.CloseDsm);
|
||||
var rc = PInvoke.DsmEntry(Session.GetAppId(), null, DataGroups.Control, DataArgumentType.Parent, Message.CloseDsm, ref handle);
|
||||
var rc = Dsm.DsmEntry(Session.GetAppId(), null, DataGroups.Control, DataArgumentType.Parent, Message.CloseDsm, ref handle);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeState(2, true);
|
||||
@@ -41,7 +41,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode OpenDsm(IntPtr handle)
|
||||
{
|
||||
Session.VerifyState(1, 2, DataGroups.Control, DataArgumentType.Parent, Message.OpenDsm);
|
||||
var rc = PInvoke.DsmEntry(Session.GetAppId(), null, DataGroups.Control, DataArgumentType.Parent, Message.OpenDsm, ref handle);
|
||||
var rc = Dsm.DsmEntry(Session.GetAppId(), null, DataGroups.Control, DataArgumentType.Parent, Message.OpenDsm, ref handle);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeState(3, true);
|
||||
|
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode PassThrough(TWPassThru sourcePassThru)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.PassThru, Message.PassThru);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.PassThru, sourcePassThru);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.PassThru, sourcePassThru);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
internal ReturnCode EndXfer(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(6, 7, DataGroups.Control, DataArgumentType.PendingXfers, Message.EndXfer);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EndXfer, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EndXfer, pendingXfers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -35,7 +35,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.PendingXfers, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, pendingXfers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
||||
internal ReturnCode Reset(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.PendingXfers, Message.Reset);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, pendingXfers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,7 +58,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode StopFeeder(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.PendingXfers, Message.StopFeeder);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.StopFeeder, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.StopFeeder, pendingXfers);
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Get);
|
||||
setupFileXfer = new TWSetupFileXfer();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, setupFileXfer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -32,7 +32,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.GetDefault);
|
||||
setupFileXfer = new TWSetupFileXfer();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, setupFileXfer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -45,7 +45,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Reset);
|
||||
setupFileXfer = new TWSetupFileXfer();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, setupFileXfer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -60,7 +60,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWSetupFileXfer setupFileXfer)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, setupFileXfer);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupMemXfer, Message.Get);
|
||||
setupMemXfer = new TWSetupMemXfer();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, setupMemXfer);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, setupMemXfer);
|
||||
}
|
||||
}
|
||||
}
|
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(2, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
||||
status = new TWStatus();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), null, Message.Get, status);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), null, Message.Get, status);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -31,7 +31,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
||||
status = new TWStatus();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, status);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, status);
|
||||
}
|
||||
}
|
||||
}
|
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(TWStatusUtf8 status)
|
||||
{
|
||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.StatusUtf8, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), null, Message.Get, status);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), null, Message.Get, status);
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,7 +23,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode DisableDS(TWUserInterface userInterface)
|
||||
{
|
||||
Session.VerifyState(5, 5, DataGroups.Control, DataArgumentType.UserInterface, Message.DisableDS);
|
||||
var rc = PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.DisableDS, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.DisableDS, userInterface);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeState(4, true);
|
||||
@@ -41,7 +41,7 @@ namespace NTwain.Triplets
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDS);
|
||||
using (var pending = Session.GetPendingStateChanger(5))
|
||||
{
|
||||
var rc = PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EnableDS, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EnableDS, userInterface);
|
||||
if (rc == ReturnCode.Success ||
|
||||
(!userInterface.ShowUI && rc == ReturnCode.CheckStatus))
|
||||
{
|
||||
@@ -63,7 +63,7 @@ namespace NTwain.Triplets
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDSUIOnly);
|
||||
using (var pending = Session.GetPendingStateChanger(5))
|
||||
{
|
||||
var rc = PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EnableDSUIOnly, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EnableDSUIOnly, userInterface);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
pending.Commit();
|
||||
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(ref DataGroups value)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.XferGroup, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Get, ref value);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Get, ref value);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -33,7 +33,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(DataGroups value)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.XferGroup, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Set, ref value);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Set, ref value);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.CieColor, Message.Get);
|
||||
cieColor = new TWCieColor();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, cieColor);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, cieColor);
|
||||
}
|
||||
}
|
||||
}
|
@@ -15,7 +15,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(7, 7, DataGroups.Image, DataArgumentType.ExtImageInfo, Message.Get);
|
||||
info = new TWExtImageInfo();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
}
|
||||
}
|
||||
}
|
@@ -22,7 +22,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.Get);
|
||||
filter = new TWFilter();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, filter);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.GetDefault);
|
||||
filter = new TWFilter();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, filter);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWFilter filter)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Filter, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, filter);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -58,7 +58,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Filter, Message.Reset);
|
||||
filter = new TWFilter();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, filter);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, filter);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.GrayResponse, Message.Reset);
|
||||
response = new TWGrayResponse();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -33,7 +33,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWGrayResponse response)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.GrayResponse, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, response);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, response);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.IccProfile, Message.Get);
|
||||
profile = new TWMemory();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, DataArgumentType.IccProfile, Message.Get, ref profile);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataArgumentType.IccProfile, Message.Get, ref profile);
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageFileXfer, Message.Get);
|
||||
IntPtr z = IntPtr.Zero;
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Image, DataArgumentType.ImageFileXfer, Message.Get, ref z);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Image, DataArgumentType.ImageFileXfer, Message.Get, ref z);
|
||||
}
|
||||
}
|
||||
}
|
@@ -15,7 +15,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.ImageInfo, Message.Get);
|
||||
info = new TWImageInfo();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
}
|
||||
}
|
||||
}
|
@@ -15,27 +15,27 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.Get);
|
||||
layout = new TWImageLayout();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, layout);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, layout);
|
||||
}
|
||||
|
||||
public ReturnCode GetDefault(out TWImageLayout layout)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.GetDefault);
|
||||
layout = new TWImageLayout();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, layout);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, layout);
|
||||
}
|
||||
|
||||
public ReturnCode Reset(out TWImageLayout layout)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Reset);
|
||||
layout = new TWImageLayout();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, layout);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, layout);
|
||||
}
|
||||
|
||||
public ReturnCode Set(TWImageLayout layout)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, layout);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, layout);
|
||||
}
|
||||
}
|
||||
}
|
@@ -17,7 +17,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(TWImageMemXfer xfer)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageMemFileXfer, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, xfer);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, xfer);
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -17,7 +17,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(TWImageMemXfer xfer)
|
||||
{
|
||||
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.ImageMemXfer, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, xfer);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, xfer);
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(ref IntPtr handle)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageNativeXfer, Message.Get);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Image, DataArgumentType.ImageNativeXfer, Message.Get, ref handle);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Image, DataArgumentType.ImageNativeXfer, Message.Get, ref handle);
|
||||
}
|
||||
}
|
||||
}
|
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.Get);
|
||||
compression = new TWJpegCompression();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, compression);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, compression);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.GetDefault);
|
||||
compression = new TWJpegCompression();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, compression);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, compression);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Reset);
|
||||
compression = new TWJpegCompression();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, compression);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, compression);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -59,7 +59,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWJpegCompression compression)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, compression);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, compression);
|
||||
}
|
||||
}
|
||||
}
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.Get);
|
||||
palette = new TWPalette8();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, palette);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, palette);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -32,7 +32,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.GetDefault);
|
||||
palette = new TWPalette8();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, palette);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, palette);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -45,7 +45,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Palette8, Message.Reset);
|
||||
palette = new TWPalette8();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, palette);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, palette);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -59,7 +59,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWPalette8 palette)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Palette8, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, palette);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, palette);
|
||||
}
|
||||
}
|
||||
}
|
@@ -22,7 +22,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.RgbResponse, Message.Reset);
|
||||
response = new TWRgbResponse();
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWRgbResponse response)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.RgbResponse, Message.Set);
|
||||
return PInvoke.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, response);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, response);
|
||||
}
|
||||
}
|
||||
}
|
@@ -5,12 +5,12 @@ using NTwain.Values;
|
||||
|
||||
namespace NTwain.Triplets
|
||||
{
|
||||
static partial class PInvoke
|
||||
static partial class Dsm
|
||||
{
|
||||
static partial class NativeMethods
|
||||
{
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
ref IntPtr data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -28,7 +28,7 @@ namespace NTwain.Triplets
|
||||
ref DataGroups data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -37,7 +37,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWAudioInfo data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCapability data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -55,7 +55,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCustomDSData data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -64,7 +64,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWDeviceEvent data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -73,7 +73,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCallback data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -82,7 +82,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCallback2 data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -91,7 +91,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWEntryPoint data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -100,7 +100,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWEvent data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -109,7 +109,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWFileSystem data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
IntPtr zero,
|
||||
DataGroups dg,
|
||||
@@ -118,7 +118,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWIdentity data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -127,7 +127,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPassThru data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -136,7 +136,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPendingXfers data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -145,7 +145,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWSetupFileXfer data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -154,7 +154,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWSetupMemXfer data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -163,7 +163,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWStatusUtf8 data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -172,7 +172,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWUserInterface data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -181,7 +181,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCieColor data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -190,7 +190,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWExtImageInfo data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -199,7 +199,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWFilter data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -208,7 +208,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWGrayResponse data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -217,7 +217,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageInfo data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -226,7 +226,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageLayout data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -235,7 +235,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageMemXfer data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -244,7 +244,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWJpegCompression data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -253,7 +253,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPalette8 data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -262,7 +262,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWRgbResponse data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -271,7 +271,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWStatus data);
|
||||
|
||||
[DllImport("/usr/local/lib/libtwaindsm.so", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntryLinux(
|
||||
public static extern ReturnCode DsmLinux(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
@@ -5,12 +5,12 @@ using NTwain.Values;
|
||||
|
||||
namespace NTwain.Triplets
|
||||
{
|
||||
static partial class PInvoke
|
||||
static partial class Dsm
|
||||
{
|
||||
static partial class NativeMethods
|
||||
{
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
ref IntPtr data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -28,7 +28,7 @@ namespace NTwain.Triplets
|
||||
ref DataGroups data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -37,7 +37,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWAudioInfo data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCapability data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -55,7 +55,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCustomDSData data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -64,7 +64,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWDeviceEvent data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -73,7 +73,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCallback data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -82,7 +82,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCallback2 data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -91,7 +91,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWEntryPoint data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -100,7 +100,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWEvent data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -109,7 +109,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWFileSystem data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
IntPtr zero,
|
||||
DataGroups dg,
|
||||
@@ -118,7 +118,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWIdentity data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -127,7 +127,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPassThru data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -136,7 +136,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPendingXfers data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -145,7 +145,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWSetupFileXfer data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -154,7 +154,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWSetupMemXfer data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -163,7 +163,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWStatusUtf8 data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -172,7 +172,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWUserInterface data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -181,7 +181,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCieColor data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -190,7 +190,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWExtImageInfo data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -199,7 +199,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWFilter data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -208,7 +208,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWGrayResponse data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -217,7 +217,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageInfo data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -226,7 +226,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageLayout data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -235,7 +235,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageMemXfer data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -244,7 +244,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWJpegCompression data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -253,7 +253,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPalette8 data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -262,7 +262,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWRgbResponse data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -271,7 +271,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWStatus data);
|
||||
|
||||
[DllImport("twaindsm", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry64(
|
||||
public static extern ReturnCode DsmWinNew(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
@@ -5,12 +5,12 @@ using NTwain.Values;
|
||||
|
||||
namespace NTwain.Triplets
|
||||
{
|
||||
static partial class PInvoke
|
||||
static partial class Dsm
|
||||
{
|
||||
static partial class NativeMethods
|
||||
{
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
ref IntPtr data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -28,7 +28,7 @@ namespace NTwain.Triplets
|
||||
ref DataGroups data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -37,7 +37,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWAudioInfo data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCapability data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -55,7 +55,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCustomDSData data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -64,7 +64,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWDeviceEvent data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -73,7 +73,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCallback data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -82,7 +82,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCallback2 data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -91,7 +91,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWEntryPoint data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -100,7 +100,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWEvent data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -109,7 +109,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWFileSystem data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
IntPtr zero,
|
||||
DataGroups dg,
|
||||
@@ -118,7 +118,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWIdentity data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -127,7 +127,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPassThru data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -136,7 +136,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPendingXfers data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -145,7 +145,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWSetupFileXfer data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -154,7 +154,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWSetupMemXfer data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -163,7 +163,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWStatusUtf8 data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -172,7 +172,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWUserInterface data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -181,7 +181,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWCieColor data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -190,7 +190,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWExtImageInfo data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -199,7 +199,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWFilter data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -208,7 +208,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWGrayResponse data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -217,7 +217,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageInfo data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -226,7 +226,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageLayout data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -235,7 +235,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWImageMemXfer data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -244,7 +244,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWJpegCompression data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -253,7 +253,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWPalette8 data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -262,7 +262,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWRgbResponse data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
||||
@@ -271,7 +271,7 @@ namespace NTwain.Triplets
|
||||
[In, Out]TWStatus data);
|
||||
|
||||
[DllImport("twain_32", EntryPoint = "#1")]
|
||||
public static extern ReturnCode DsmEntry32(
|
||||
public static extern ReturnCode DsmWinOld(
|
||||
[In, Out]TWIdentity origin,
|
||||
[In, Out]TWIdentity destination,
|
||||
DataGroups dg,
|
616
NTwain/Triplets/Dsm.cs
Normal file
616
NTwain/Triplets/Dsm.cs
Normal file
@@ -0,0 +1,616 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using NTwain.Data;
|
||||
using NTwain.Values;
|
||||
using System.IO;
|
||||
|
||||
namespace NTwain.Triplets
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the full TWAIN entry signatures through pinvoke.
|
||||
/// These are called by all the defined triplets methods in
|
||||
/// this namespace.
|
||||
/// </summary>
|
||||
static partial class Dsm
|
||||
{
|
||||
// Change pinvoke base on where running in 64bit mode.
|
||||
// Theoretically [DllImport("twaindsm", EntryPoint = "#1")]
|
||||
// works on both 32 and 64 bit
|
||||
// but it's not installed on either system by default.
|
||||
// A proper 64 bit twain driver would've installed it so
|
||||
// in essence it only exists in 64 bit systems and thus
|
||||
// the 2 sets of identical pinvokes for windows :(
|
||||
|
||||
public static readonly bool CanUseNewDSM = CheckIfCanUseNewDSM();
|
||||
|
||||
private static bool CheckIfCanUseNewDSM()
|
||||
{
|
||||
#if DEBUG
|
||||
return IntPtr.Size == 8;
|
||||
#else
|
||||
var path = Path.Combine(Environment.SystemDirectory, "twaindsm.dll");
|
||||
// if 64bit or the dll exists use it
|
||||
return IntPtr.Size == 8 ||
|
||||
File.Exists(path);
|
||||
#endif
|
||||
}
|
||||
|
||||
static readonly bool IsWin = Environment.OSVersion.Platform == PlatformID.Win32NT;
|
||||
static readonly bool IsLinux = Environment.OSVersion.Platform == PlatformID.Unix;
|
||||
|
||||
// define sig for each different data type since "object" doesn't work
|
||||
|
||||
#region wrapped calls
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
DataGroups dg,
|
||||
DataArgumentType dat,
|
||||
Message msg,
|
||||
ref IntPtr data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, dg, dat, msg, ref data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, dg, dat, msg, ref data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
DataGroups dg,
|
||||
DataArgumentType dat,
|
||||
Message msg,
|
||||
ref DataGroups data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, dg, dat, msg, ref data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, dg, dat, msg, ref data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, dg, dat, msg, ref data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWAudioInfo data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCapability data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCustomDSData data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWDeviceEvent data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCallback data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCallback2 data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWEntryPoint data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWEvent data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWFileSystem data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
Message msg,
|
||||
TWIdentity data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWPassThru data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWPendingXfers data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWSetupFileXfer data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWSetupMemXfer data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWStatusUtf8 data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWUserInterface data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCieColor data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWExtImageInfo data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWFilter data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWGrayResponse data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWImageInfo data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWImageLayout data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWImageMemXfer data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWJpegCompression data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWPalette8 data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWRgbResponse data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWStatus data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
DataArgumentType dat,
|
||||
Message msg,
|
||||
ref TWMemory data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmWinNew(origin, destination, DataGroups.Control, dat, msg, ref data); }
|
||||
else { return NativeMethods.DsmWinOld(origin, destination, DataGroups.Control, dat, msg, ref data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmLinux(origin, destination, DataGroups.Control, dat, msg, ref data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
@@ -1,613 +0,0 @@
|
||||
using System;
|
||||
using System.Runtime.InteropServices;
|
||||
using NTwain.Data;
|
||||
using NTwain.Values;
|
||||
using System.IO;
|
||||
|
||||
namespace NTwain.Triplets
|
||||
{
|
||||
/// <summary>
|
||||
/// Contains the full TWAIN entry signatures through pinvoke.
|
||||
/// These are called by all the defined triplets methods in
|
||||
/// this namespace.
|
||||
/// </summary>
|
||||
static partial class PInvoke
|
||||
{
|
||||
// Change pinvoke base on where running in 64bit mode.
|
||||
// Theoretically [DllImport("twaindsm", EntryPoint = "#1")]
|
||||
// works on both 32 and 64 bit
|
||||
// but it's not installed on either system by default.
|
||||
// A proper 64 bit twain driver would've installed it so
|
||||
// in essence it only exists in 64 bit systems and thus
|
||||
// the 2 sets of identical pinvokes :(
|
||||
|
||||
public static readonly bool CanUseNewDSM = CheckIfCanUseNewDSM();
|
||||
|
||||
private static bool CheckIfCanUseNewDSM()
|
||||
{
|
||||
var path = Path.Combine(Environment.SystemDirectory, "twaindsm.dll");
|
||||
// if 64bit or the dll exists use it
|
||||
return IntPtr.Size == 8 ||
|
||||
File.Exists(path);
|
||||
}
|
||||
|
||||
static readonly bool IsWin = Environment.OSVersion.Platform == PlatformID.Win32NT;
|
||||
static readonly bool IsOSX = Environment.OSVersion.Platform == PlatformID.MacOSX;
|
||||
static readonly bool IsLinux = Environment.OSVersion.Platform == PlatformID.Unix;
|
||||
|
||||
// define sig for each different data type since "object" doesn't work
|
||||
|
||||
#region wrapped calls
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
DataGroups dg,
|
||||
DataArgumentType dat,
|
||||
Message msg,
|
||||
ref IntPtr data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, dg, dat, msg, ref data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, dg, dat, msg, ref data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, dg, dat, msg, ref data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
DataGroups dg,
|
||||
DataArgumentType dat,
|
||||
Message msg,
|
||||
ref DataGroups data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, dg, dat, msg, ref data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, dg, dat, msg, ref data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, dg, dat, msg, ref data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWAudioInfo data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Audio, DataArgumentType.AudioInfo, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCapability data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.Capability, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCustomDSData data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.CustomDSData, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWDeviceEvent data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.DeviceEvent, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCallback data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCallback2 data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.Callback, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWEntryPoint data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.EntryPoint, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWEvent data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.Event, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWFileSystem data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.FileSystem, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
Message msg,
|
||||
TWIdentity data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, IntPtr.Zero, DataGroups.Control, DataArgumentType.Identity, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWPassThru data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.PassThru, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWPendingXfers data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.PendingXfers, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWSetupFileXfer data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupFileXfer, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWSetupMemXfer data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.SetupMemXfer, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWStatusUtf8 data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.StatusUtf8, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWUserInterface data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.UserInterface, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWCieColor data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.CieColor, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWExtImageInfo data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.ExtImageInfo, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWFilter data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.Filter, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWGrayResponse data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.GrayResponse, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWImageInfo data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageInfo, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWImageLayout data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageLayout, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWImageMemXfer data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.ImageMemXfer, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWJpegCompression data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.JpegCompression, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWPalette8 data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.Palette8, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWRgbResponse data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Image, DataArgumentType.RgbResponse, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
Message msg,
|
||||
TWStatus data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, DataArgumentType.Status, msg, data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
public static ReturnCode DsmEntry(
|
||||
TWIdentity origin,
|
||||
TWIdentity destination,
|
||||
DataArgumentType dat,
|
||||
Message msg,
|
||||
ref TWMemory data)
|
||||
{
|
||||
if (IsWin)
|
||||
{
|
||||
if (CanUseNewDSM) { return NativeMethods.DsmEntry64(origin, destination, DataGroups.Control, dat, msg, ref data); }
|
||||
else { return NativeMethods.DsmEntry32(origin, destination, DataGroups.Control, dat, msg, ref data); }
|
||||
}
|
||||
else if (IsLinux)
|
||||
{
|
||||
return NativeMethods.DsmEntryLinux(origin, destination, DataGroups.Control, dat, msg, ref data);
|
||||
}
|
||||
throw new PlatformNotSupportedException();
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user