mirror of
https://github.com/soukoku/ntwain.git
synced 2025-12-01 10:54:08 +08:00
Test idea of wrapping source identity into .net class.
This commit is contained in:
@@ -16,7 +16,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode RegisterCallback(TWCallback callback)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Callback, Message.RegisterCallback);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.RegisterCallback, callback);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.RegisterCallback, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -16,7 +16,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode RegisterCallback(TWCallback2 callback)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Callback, Message.RegisterCallback);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.RegisterCallback, callback);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.RegisterCallback, callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -17,7 +17,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.Get);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.Get, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.Get, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -28,7 +28,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetCurrent(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.GetCurrent);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.GetCurrent, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.GetCurrent, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -39,7 +39,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetDefault(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.GetDefault);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.GetDefault, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.GetDefault, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -51,7 +51,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetHelp(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetHelp);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.GetHelp, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.GetHelp, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -63,7 +63,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetLabel(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetLabel);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.GetLabel, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.GetLabel, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -75,7 +75,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetLabelEnum(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetLabelEnum);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.GetLabelEnum, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.GetLabelEnum, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -86,7 +86,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode QuerySupport(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.QuerySupport);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.QuerySupport, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.QuerySupport, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -98,7 +98,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Reset(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.Reset);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.Reset, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.Reset, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -110,7 +110,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode ResetAll(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.ResetAll);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.ResetAll, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.ResetAll, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -125,7 +125,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.Capability, Message.Set);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.Set, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.Set, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -139,7 +139,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode SetConstraint(TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.SetConstraint);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, DataArgumentType.Capability, Message.SetConstraint, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataArgumentType.Capability, Message.SetConstraint, capability);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, (DataArgumentType)customDAT, Message.Get);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.Get, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.Get, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -31,7 +31,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetCurrent(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, (DataArgumentType)customDAT, Message.GetCurrent);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.GetCurrent, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.GetCurrent, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -43,7 +43,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetDefault(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, (DataArgumentType)customDAT, Message.GetDefault);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.GetDefault, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.GetDefault, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -56,7 +56,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetHelp(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, (DataArgumentType)customDAT, Message.GetHelp);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.GetHelp, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.GetHelp, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -69,7 +69,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetLabel(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, (DataArgumentType)customDAT, Message.GetLabel);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.GetLabel, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.GetLabel, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -82,7 +82,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetLabelEnum(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, (DataArgumentType)customDAT, Message.GetLabelEnum);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.GetLabelEnum, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.GetLabelEnum, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -94,7 +94,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode QuerySupport(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, (DataArgumentType)customDAT, Message.QuerySupport);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.QuerySupport, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.QuerySupport, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -107,7 +107,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Reset(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, (DataArgumentType)customDAT, Message.Reset);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.Reset, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.Reset, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -120,7 +120,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode ResetAll(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, (DataArgumentType)customDAT, Message.ResetAll);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.ResetAll, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.ResetAll, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -136,7 +136,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, (DataArgumentType)customDAT, Message.Set);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.Set, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.Set, capability);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -151,7 +151,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode SetConstraint(ushort customDAT, TWCapability capability)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, (DataArgumentType)customDAT, Message.SetConstraint);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, (DataArgumentType)customDAT, Message.SetConstraint, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, (DataArgumentType)customDAT, Message.SetConstraint, capability);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.CustomDSData, Message.Get);
|
||||
customData = new TWCustomDSData();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, customData);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, 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 Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Set, customData);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Set, customData);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -14,7 +14,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
|
||||
sourceDeviceEvent = new TWDeviceEvent();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, sourceDeviceEvent);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Get, sourceDeviceEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,7 +18,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.EntryPoint, Message.Get);
|
||||
entryPoint = new TWEntryPoint();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, entryPoint);
|
||||
return Dsm.DsmEntry(Session.AppId, Message.Get, entryPoint);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode ProcessEvent(TWEvent theEvent)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Event, Message.ProcessEvent);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.ProcessEvent, theEvent);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.ProcessEvent, theEvent);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode AutomaticCaptureDirectory(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.AutomaticCaptureDirectory);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.AutomaticCaptureDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.AutomaticCaptureDirectory, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -36,7 +36,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode ChangeDirectory(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.ChangeDirectory);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.ChangeDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.ChangeDirectory, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -52,7 +52,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Copy(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Copy);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Copy, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Copy, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -64,7 +64,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode CreateDirectory(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.CreateDirectory);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.CreateDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.CreateDirectory, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -77,7 +77,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Delete(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Delete);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Delete, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Delete, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -89,7 +89,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode FormatMedia(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.FormatMedia);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.FormatMedia, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.FormatMedia, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -102,7 +102,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetClose(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetClose);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetClose, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.GetClose, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -114,7 +114,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetFirstFile(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetFirstFile);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetFirstFile, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.GetFirstFile, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -127,7 +127,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetInfo(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.FileSystem, Message.GetInfo);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetInfo, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.GetInfo, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -139,7 +139,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode GetNextFile(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetNextFile);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetNextFile, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.GetNextFile, fileSystem);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -155,7 +155,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Rename(TWFileSystem fileSystem)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Rename);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Rename, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Rename, fileSystem);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
||||
internal ReturnCode CloseDS()
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Identity, Message.CloseDS);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Message.CloseDS, Session.SourceId);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Message.CloseDS, Session.Source.Identity);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeSourceId(null);
|
||||
@@ -75,10 +75,10 @@ namespace NTwain.Triplets
|
||||
/// </summary>
|
||||
/// <param name="source">The source.</param>
|
||||
/// <returns></returns>
|
||||
internal ReturnCode OpenDS(TWIdentity source)
|
||||
internal ReturnCode OpenDS(TwainSource source)
|
||||
{
|
||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Identity, Message.OpenDS);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Message.OpenDS, source);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Message.OpenDS, source.Identity);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeSourceId(source);
|
||||
|
||||
@@ -18,7 +18,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode PassThrough(TWPassThru sourcePassThru)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.PassThru, Message.PassThru);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.PassThru, sourcePassThru);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.PassThru, sourcePassThru);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
||||
internal ReturnCode EndXfer(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(6, 7, DataGroups.Control, DataArgumentType.PendingXfers, Message.EndXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.EndXfer, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.EndXfer, pendingXfers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Get(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.PendingXfers, Message.Get);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Get, pendingXfers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -45,7 +45,7 @@ namespace NTwain.Triplets
|
||||
internal ReturnCode Reset(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.PendingXfers, Message.Reset);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Reset, pendingXfers);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -57,7 +57,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode StopFeeder(TWPendingXfers pendingXfers)
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.PendingXfers, Message.StopFeeder);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.StopFeeder, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.StopFeeder, pendingXfers);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Get);
|
||||
setupFileXfer = new TWSetupFileXfer();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Get, setupFileXfer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.GetDefault);
|
||||
setupFileXfer = new TWSetupFileXfer();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetDefault, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.GetDefault, setupFileXfer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,7 +48,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Reset);
|
||||
setupFileXfer = new TWSetupFileXfer();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Reset, setupFileXfer);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -63,7 +63,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode Set(TWSetupFileXfer setupFileXfer)
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Set);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Set, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Set, setupFileXfer);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupMemXfer, Message.Get);
|
||||
setupMemXfer = new TWSetupMemXfer();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, setupMemXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Get, setupMemXfer);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -32,7 +32,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
||||
status = new TWStatus();
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, status);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.Get, status);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -22,7 +22,7 @@ namespace NTwain.Triplets
|
||||
public ReturnCode DisableDS(TWUserInterface userInterface)
|
||||
{
|
||||
Session.VerifyState(5, 5, DataGroups.Control, DataArgumentType.UserInterface, Message.DisableDS);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.DisableDS, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.DisableDS, userInterface);
|
||||
if (rc == ReturnCode.Success)
|
||||
{
|
||||
Session.ChangeState(4, true);
|
||||
@@ -40,7 +40,7 @@ namespace NTwain.Triplets
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDS);
|
||||
using (var pending = Session.GetPendingStateChanger(5))
|
||||
{
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.EnableDS, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Session.Source.Identity, Message.EnableDS, userInterface);
|
||||
if (rc == ReturnCode.Success ||
|
||||
(!userInterface.ShowUI && rc == ReturnCode.CheckStatus))
|
||||
{
|
||||
@@ -62,7 +62,7 @@ namespace NTwain.Triplets
|
||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDSUIOnly);
|
||||
using (var pending = Session.GetPendingStateChanger(5))
|
||||
{
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.EnableDSUIOnly, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, Session.Source.Identity, 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 Dsm.DsmEntry(Session.AppId, Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Get, ref value);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, 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 Dsm.DsmEntry(Session.AppId, Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Set, ref value);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.Source.Identity, DataGroups.Control, DataArgumentType.XferGroup, Message.Set, ref value);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user