mirror of
https://github.com/soukoku/ntwain.git
synced 2025-04-05 20:59:23 +08:00
Internal rename and loop check.
This commit is contained in:
parent
17ef99e4a2
commit
b7993de123
@ -32,7 +32,7 @@ namespace NTwain
|
||||
/// Gets the app id used for the session.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
TWIdentity GetAppId();
|
||||
TWIdentity AppId { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether calls to triplets will verify the current twain session state.
|
||||
|
@ -64,33 +64,37 @@ namespace NTwain
|
||||
|
||||
public void BeginInvoke(Action action)
|
||||
{
|
||||
if (_dispatcher != null)
|
||||
{
|
||||
_dispatcher.BeginInvoke(DispatcherPriority.Normal, action);
|
||||
}
|
||||
if (_dispatcher == null) { throw new InvalidOperationException("Message loop has not started yet."); }
|
||||
|
||||
_dispatcher.BeginInvoke(DispatcherPriority.Normal, action);
|
||||
}
|
||||
|
||||
public void Invoke(Action action)
|
||||
{
|
||||
if (_dispatcher != null)
|
||||
{
|
||||
if (_dispatcher.CheckAccess())
|
||||
{
|
||||
action();
|
||||
}
|
||||
else
|
||||
{
|
||||
//_dispatcher.Invoke(DispatcherPriority.Normal, action);
|
||||
if (_dispatcher == null) { throw new InvalidOperationException("Message loop has not started yet."); }
|
||||
|
||||
var man = new ManualResetEvent(false);
|
||||
_dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
|
||||
if (_dispatcher.CheckAccess())
|
||||
{
|
||||
action();
|
||||
}
|
||||
else
|
||||
{
|
||||
//_dispatcher.Invoke(DispatcherPriority.Normal, action);
|
||||
// why use this instead of the single line above? for possible future use in mono!
|
||||
var man = new ManualResetEvent(false);
|
||||
_dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
action();
|
||||
}
|
||||
finally
|
||||
{
|
||||
man.Set();
|
||||
}));
|
||||
man.WaitOne();
|
||||
man.Close();
|
||||
}
|
||||
}
|
||||
}));
|
||||
man.WaitOne();
|
||||
man.Close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(6, 6, DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get);
|
||||
IntPtr z = IntPtr.Zero;
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get, ref z);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Audio, DataArgumentType.AudioNativeXfer, Message.Get, ref handle);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.RegisterCallback, callback);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.RegisterCallback, callback);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetCurrent, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetHelp, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetLabel, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetLabelEnum, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.QuerySupport, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ResetAll, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.SetConstraint, capability);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, customData);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, customData);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, sourceDeviceEvent);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, entryPoint);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ProcessEvent, theEvent);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.AutomaticCaptureDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.ChangeDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Copy, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.CreateDirectory, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Delete, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.FormatMedia, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetClose, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetFirstFile, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetInfo, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetNextFile, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Rename, fileSystem);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 = Dsm.DsmEntry(Session.GetAppId(), Message.CloseDS, Session.SourceId);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Message.GetDefault, source);
|
||||
return Dsm.DsmEntry(Session.AppId, Message.GetDefault, source);
|
||||
}
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ namespace NTwain.Triplets
|
||||
{
|
||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetFirst);
|
||||
source = new TWIdentity();
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Message.GetFirst, source);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Message.GetNext, source);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 = Dsm.DsmEntry(Session.GetAppId(), Message.OpenDS, source);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Message.Set, source);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Message.UserSelect, source);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 = Dsm.DsmEntry(Session.GetAppId(), null, DataGroups.Control, DataArgumentType.Parent, Message.CloseDsm, ref handle);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, 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 = Dsm.DsmEntry(Session.GetAppId(), null, DataGroups.Control, DataArgumentType.Parent, Message.OpenDsm, ref handle);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.PassThru, sourcePassThru);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EndXfer, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.StopFeeder, pendingXfers);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, setupFileXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, setupMemXfer);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), null, Message.Get, status);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, status);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), null, Message.Get, status);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 = Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.DisableDS, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, 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 = Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EnableDS, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, 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 = Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.EnableDSUIOnly, userInterface);
|
||||
var rc = Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Get, ref value);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Control, DataArgumentType.XferGroup, Message.Set, ref value);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, cieColor);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, filter);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, filter);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, filter);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, filter);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, response);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataArgumentType.IccProfile, Message.Get, ref profile);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Image, DataArgumentType.ImageFileXfer, Message.Get, ref z);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, info);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, layout);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, layout);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, layout);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, layout);
|
||||
}
|
||||
|
||||
public ReturnCode Set(TWImageLayout layout)
|
||||
{
|
||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Set);
|
||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, layout);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, xfer);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, xfer);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, DataGroups.Image, DataArgumentType.ImageNativeXfer, Message.Get, ref handle);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, compression);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, compression);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, compression);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, compression);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, palette);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, palette);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, palette);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, palette);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
||||
return Dsm.DsmEntry(Session.AppId, 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 Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Set, response);
|
||||
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Set, response);
|
||||
}
|
||||
}
|
||||
}
|
@ -72,7 +72,7 @@ namespace NTwain
|
||||
/// Gets the app id used for the session.
|
||||
/// </summary>
|
||||
/// <value>The app id.</value>
|
||||
TWIdentity ITwainStateInternal.GetAppId() { return _appId; }
|
||||
TWIdentity ITwainStateInternal.AppId { get { return _appId; } }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether calls to triplets will verify the current twain session state.
|
||||
@ -1170,15 +1170,8 @@ namespace NTwain
|
||||
/// The MSG structure in Windows for TWAIN use.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Sequential)]
|
||||
protected struct MESSAGE
|
||||
struct MESSAGE
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="MESSAGE"/> struct.
|
||||
/// </summary>
|
||||
/// <param name="hwnd">The HWND.</param>
|
||||
/// <param name="message">The message.</param>
|
||||
/// <param name="wParam">The w parameter.</param>
|
||||
/// <param name="lParam">The l parameter.</param>
|
||||
public MESSAGE(IntPtr hwnd, int message, IntPtr wParam, IntPtr lParam)
|
||||
{
|
||||
_hwnd = hwnd;
|
||||
|
Loading…
Reference in New Issue
Block a user