mirror of
https://github.com/soukoku/ntwain.git
synced 2025-09-19 18:27:56 +08:00
Internal rename and loop check.
This commit is contained in:
@@ -32,7 +32,7 @@ namespace NTwain
|
|||||||
/// Gets the app id used for the session.
|
/// Gets the app id used for the session.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
TWIdentity GetAppId();
|
TWIdentity AppId { get; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether calls to triplets will verify the current twain session state.
|
/// 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)
|
public void BeginInvoke(Action action)
|
||||||
{
|
{
|
||||||
if (_dispatcher != null)
|
if (_dispatcher == null) { throw new InvalidOperationException("Message loop has not started yet."); }
|
||||||
{
|
|
||||||
_dispatcher.BeginInvoke(DispatcherPriority.Normal, action);
|
_dispatcher.BeginInvoke(DispatcherPriority.Normal, action);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void Invoke(Action action)
|
public void Invoke(Action action)
|
||||||
{
|
{
|
||||||
if (_dispatcher != null)
|
if (_dispatcher == null) { throw new InvalidOperationException("Message loop has not started yet."); }
|
||||||
{
|
|
||||||
if (_dispatcher.CheckAccess())
|
|
||||||
{
|
|
||||||
action();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
//_dispatcher.Invoke(DispatcherPriority.Normal, action);
|
|
||||||
|
|
||||||
var man = new ManualResetEvent(false);
|
if (_dispatcher.CheckAccess())
|
||||||
_dispatcher.BeginInvoke(DispatcherPriority.Normal, new Action(() =>
|
{
|
||||||
|
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();
|
action();
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
man.Set();
|
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);
|
Session.VerifyState(6, 6, DataGroups.Audio, DataArgumentType.AudioFileXfer, Message.Get);
|
||||||
IntPtr z = IntPtr.Zero;
|
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);
|
Session.VerifyState(6, 7, DataGroups.Audio, DataArgumentType.AudioInfo, Message.Get);
|
||||||
info = new TWAudioInfo();
|
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)
|
public ReturnCode Get(ref IntPtr handle)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 6, DataGroups.Audio, DataArgumentType.AudioNativeXfer, Message.Get);
|
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)
|
public ReturnCode RegisterCallback(TWCallback callback)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Callback, Message.RegisterCallback);
|
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)
|
public ReturnCode RegisterCallback(TWCallback2 callback)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Callback, Message.RegisterCallback);
|
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)
|
public ReturnCode Get(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.Get);
|
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>
|
/// <summary>
|
||||||
@@ -29,7 +29,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetCurrent(TWCapability capability)
|
public ReturnCode GetCurrent(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.GetCurrent);
|
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>
|
/// <summary>
|
||||||
@@ -40,7 +40,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetDefault(TWCapability capability)
|
public ReturnCode GetDefault(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.GetDefault);
|
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>
|
/// <summary>
|
||||||
@@ -52,7 +52,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetHelp(TWCapability capability)
|
public ReturnCode GetHelp(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetHelp);
|
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>
|
/// <summary>
|
||||||
@@ -64,7 +64,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetLabel(TWCapability capability)
|
public ReturnCode GetLabel(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetLabel);
|
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>
|
/// <summary>
|
||||||
@@ -76,7 +76,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetLabelEnum(TWCapability capability)
|
public ReturnCode GetLabelEnum(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.GetLabelEnum);
|
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>
|
/// <summary>
|
||||||
@@ -87,7 +87,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode QuerySupport(TWCapability capability)
|
public ReturnCode QuerySupport(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.QuerySupport);
|
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>
|
/// <summary>
|
||||||
@@ -99,7 +99,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Reset(TWCapability capability)
|
public ReturnCode Reset(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.Reset);
|
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>
|
/// <summary>
|
||||||
@@ -111,7 +111,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode ResetAll(TWCapability capability)
|
public ReturnCode ResetAll(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Capability, Message.ResetAll);
|
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>
|
/// <summary>
|
||||||
@@ -126,7 +126,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWCapability capability)
|
public ReturnCode Set(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.Capability, Message.Set);
|
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>
|
/// <summary>
|
||||||
@@ -140,7 +140,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode SetConstraint(TWCapability capability)
|
public ReturnCode SetConstraint(TWCapability capability)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Capability, Message.SetConstraint);
|
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);
|
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.CustomDSData, Message.Get);
|
||||||
customData = new TWCustomDSData();
|
customData = new TWCustomDSData();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, customData);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, customData);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWCustomDSData customData)
|
public ReturnCode Set(TWCustomDSData customData)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.CustomDSData, Message.Set);
|
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);
|
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.DeviceEvent, Message.Get);
|
||||||
sourceDeviceEvent = new TWDeviceEvent();
|
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);
|
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.EntryPoint, Message.Get);
|
||||||
entryPoint = new TWEntryPoint();
|
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)
|
public ReturnCode ProcessEvent(TWEvent theEvent)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Event, Message.ProcessEvent);
|
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)
|
public ReturnCode AutomaticCaptureDirectory(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.AutomaticCaptureDirectory);
|
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>
|
/// <summary>
|
||||||
@@ -37,7 +37,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode ChangeDirectory(TWFileSystem fileSystem)
|
public ReturnCode ChangeDirectory(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.ChangeDirectory);
|
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>
|
/// <summary>
|
||||||
@@ -53,7 +53,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Copy(TWFileSystem fileSystem)
|
public ReturnCode Copy(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Copy);
|
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>
|
/// <summary>
|
||||||
@@ -65,7 +65,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode CreateDirectory(TWFileSystem fileSystem)
|
public ReturnCode CreateDirectory(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.CreateDirectory);
|
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>
|
/// <summary>
|
||||||
@@ -78,7 +78,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Delete(TWFileSystem fileSystem)
|
public ReturnCode Delete(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Delete);
|
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>
|
/// <summary>
|
||||||
@@ -90,7 +90,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode FormatMedia(TWFileSystem fileSystem)
|
public ReturnCode FormatMedia(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.FormatMedia);
|
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>
|
/// <summary>
|
||||||
@@ -103,7 +103,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetClose(TWFileSystem fileSystem)
|
public ReturnCode GetClose(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetClose);
|
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>
|
/// <summary>
|
||||||
@@ -115,7 +115,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetFirstFile(TWFileSystem fileSystem)
|
public ReturnCode GetFirstFile(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetFirstFile);
|
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>
|
/// <summary>
|
||||||
@@ -128,7 +128,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetInfo(TWFileSystem fileSystem)
|
public ReturnCode GetInfo(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.FileSystem, Message.GetInfo);
|
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>
|
/// <summary>
|
||||||
@@ -140,7 +140,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode GetNextFile(TWFileSystem fileSystem)
|
public ReturnCode GetNextFile(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.FileSystem, Message.GetNextFile);
|
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>
|
/// <summary>
|
||||||
@@ -156,7 +156,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Rename(TWFileSystem fileSystem)
|
public ReturnCode Rename(TWFileSystem fileSystem)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.FileSystem, Message.Rename);
|
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()
|
internal ReturnCode CloseDS()
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.Identity, Message.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)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
Session.ChangeSourceId(null);
|
Session.ChangeSourceId(null);
|
||||||
@@ -38,7 +38,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetDefault);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetDefault);
|
||||||
source = new TWIdentity();
|
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);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetFirst);
|
||||||
source = new TWIdentity();
|
source = new TWIdentity();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Message.GetFirst, source);
|
return Dsm.DsmEntry(Session.AppId, Message.GetFirst, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -65,7 +65,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetNext);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.GetNext);
|
||||||
source = new TWIdentity();
|
source = new TWIdentity();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Message.GetNext, source);
|
return Dsm.DsmEntry(Session.AppId, Message.GetNext, source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -76,7 +76,7 @@ namespace NTwain.Triplets
|
|||||||
internal ReturnCode OpenDS(TWIdentity source)
|
internal ReturnCode OpenDS(TWIdentity source)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Identity, Message.OpenDS);
|
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)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
Session.ChangeSourceId(source);
|
Session.ChangeSourceId(source);
|
||||||
@@ -95,7 +95,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWIdentity source)
|
public ReturnCode Set(TWIdentity source)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Identity, Message.Set);
|
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>
|
/// <summary>
|
||||||
@@ -108,7 +108,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.UserSelect);
|
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.Identity, Message.UserSelect);
|
||||||
source = new TWIdentity();
|
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)
|
public ReturnCode CloseDsm(IntPtr handle)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 3, DataGroups.Control, DataArgumentType.Parent, Message.CloseDsm);
|
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)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
Session.ChangeState(2, true);
|
Session.ChangeState(2, true);
|
||||||
@@ -41,7 +41,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode OpenDsm(IntPtr handle)
|
public ReturnCode OpenDsm(IntPtr handle)
|
||||||
{
|
{
|
||||||
Session.VerifyState(1, 2, DataGroups.Control, DataArgumentType.Parent, Message.OpenDsm);
|
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)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
Session.ChangeState(3, true);
|
Session.ChangeState(3, true);
|
||||||
|
@@ -19,7 +19,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode PassThrough(TWPassThru sourcePassThru)
|
public ReturnCode PassThrough(TWPassThru sourcePassThru)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.PassThru, Message.PassThru);
|
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)
|
internal ReturnCode EndXfer(TWPendingXfers pendingXfers)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 7, DataGroups.Control, DataArgumentType.PendingXfers, Message.EndXfer);
|
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>
|
/// <summary>
|
||||||
@@ -35,7 +35,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Get(TWPendingXfers pendingXfers)
|
public ReturnCode Get(TWPendingXfers pendingXfers)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.PendingXfers, Message.Get);
|
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>
|
/// <summary>
|
||||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
|||||||
internal ReturnCode Reset(TWPendingXfers pendingXfers)
|
internal ReturnCode Reset(TWPendingXfers pendingXfers)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.PendingXfers, Message.Reset);
|
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>
|
/// <summary>
|
||||||
@@ -58,7 +58,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode StopFeeder(TWPendingXfers pendingXfers)
|
public ReturnCode StopFeeder(TWPendingXfers pendingXfers)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.PendingXfers, Message.StopFeeder);
|
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);
|
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Get);
|
||||||
setupFileXfer = new TWSetupFileXfer();
|
setupFileXfer = new TWSetupFileXfer();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, setupFileXfer);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, setupFileXfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -32,7 +32,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.GetDefault);
|
||||||
setupFileXfer = new TWSetupFileXfer();
|
setupFileXfer = new TWSetupFileXfer();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, setupFileXfer);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetDefault, setupFileXfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -45,7 +45,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Reset);
|
||||||
setupFileXfer = new TWSetupFileXfer();
|
setupFileXfer = new TWSetupFileXfer();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, setupFileXfer);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, setupFileXfer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -60,7 +60,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWSetupFileXfer setupFileXfer)
|
public ReturnCode Set(TWSetupFileXfer setupFileXfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupFileXfer, Message.Set);
|
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);
|
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.SetupMemXfer, Message.Get);
|
||||||
setupMemXfer = new TWSetupMemXfer();
|
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);
|
Session.VerifyState(2, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
||||||
status = new TWStatus();
|
status = new TWStatus();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), null, Message.Get, status);
|
return Dsm.DsmEntry(Session.AppId, null, Message.Get, status);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -31,7 +31,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
Session.VerifyState(4, 7, DataGroups.Control, DataArgumentType.Status, Message.Get);
|
||||||
status = new TWStatus();
|
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)
|
public ReturnCode Get(TWStatusUtf8 status)
|
||||||
{
|
{
|
||||||
Session.VerifyState(3, 7, DataGroups.Control, DataArgumentType.StatusUtf8, Message.Get);
|
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)
|
public ReturnCode DisableDS(TWUserInterface userInterface)
|
||||||
{
|
{
|
||||||
Session.VerifyState(5, 5, DataGroups.Control, DataArgumentType.UserInterface, Message.DisableDS);
|
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)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
Session.ChangeState(4, true);
|
Session.ChangeState(4, true);
|
||||||
@@ -41,7 +41,7 @@ namespace NTwain.Triplets
|
|||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDS);
|
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDS);
|
||||||
using (var pending = Session.GetPendingStateChanger(5))
|
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 ||
|
if (rc == ReturnCode.Success ||
|
||||||
(!userInterface.ShowUI && rc == ReturnCode.CheckStatus))
|
(!userInterface.ShowUI && rc == ReturnCode.CheckStatus))
|
||||||
{
|
{
|
||||||
@@ -63,7 +63,7 @@ namespace NTwain.Triplets
|
|||||||
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDSUIOnly);
|
Session.VerifyState(4, 4, DataGroups.Control, DataArgumentType.UserInterface, Message.EnableDSUIOnly);
|
||||||
using (var pending = Session.GetPendingStateChanger(5))
|
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)
|
if (rc == ReturnCode.Success)
|
||||||
{
|
{
|
||||||
pending.Commit();
|
pending.Commit();
|
||||||
|
@@ -20,7 +20,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Get(ref DataGroups value)
|
public ReturnCode Get(ref DataGroups value)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Control, DataArgumentType.XferGroup, Message.Get);
|
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>
|
/// <summary>
|
||||||
@@ -33,7 +33,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(DataGroups value)
|
public ReturnCode Set(DataGroups value)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 6, DataGroups.Control, DataArgumentType.XferGroup, Message.Set);
|
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);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.CieColor, Message.Get);
|
||||||
cieColor = new TWCieColor();
|
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);
|
Session.VerifyState(7, 7, DataGroups.Image, DataArgumentType.ExtImageInfo, Message.Get);
|
||||||
info = new TWExtImageInfo();
|
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);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.Get);
|
||||||
filter = new TWFilter();
|
filter = new TWFilter();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, filter);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Filter, Message.GetDefault);
|
||||||
filter = new TWFilter();
|
filter = new TWFilter();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, filter);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetDefault, filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWFilter filter)
|
public ReturnCode Set(TWFilter filter)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Filter, Message.Set);
|
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>
|
/// <summary>
|
||||||
@@ -58,7 +58,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Filter, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Filter, Message.Reset);
|
||||||
filter = new TWFilter();
|
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);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.GrayResponse, Message.Reset);
|
||||||
response = new TWGrayResponse();
|
response = new TWGrayResponse();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -33,7 +33,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWGrayResponse response)
|
public ReturnCode Set(TWGrayResponse response)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.GrayResponse, Message.Set);
|
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);
|
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.IccProfile, Message.Get);
|
||||||
profile = new TWMemory();
|
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);
|
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageFileXfer, Message.Get);
|
||||||
IntPtr z = IntPtr.Zero;
|
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);
|
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.ImageInfo, Message.Get);
|
||||||
info = new TWImageInfo();
|
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);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.Get);
|
||||||
layout = new TWImageLayout();
|
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)
|
public ReturnCode GetDefault(out TWImageLayout layout)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.ImageLayout, Message.GetDefault);
|
||||||
layout = new TWImageLayout();
|
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)
|
public ReturnCode Reset(out TWImageLayout layout)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Reset);
|
||||||
layout = new TWImageLayout();
|
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)
|
public ReturnCode Set(TWImageLayout layout)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.ImageLayout, Message.Set);
|
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)
|
public ReturnCode Get(TWImageMemXfer xfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageMemFileXfer, Message.Get);
|
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)
|
public ReturnCode Get(TWImageMemXfer xfer)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 7, DataGroups.Image, DataArgumentType.ImageMemXfer, Message.Get);
|
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)
|
public ReturnCode Get(ref IntPtr handle)
|
||||||
{
|
{
|
||||||
Session.VerifyState(6, 6, DataGroups.Image, DataArgumentType.ImageNativeXfer, Message.Get);
|
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);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.Get);
|
||||||
compression = new TWJpegCompression();
|
compression = new TWJpegCompression();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, compression);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, compression);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.JpegCompression, Message.GetDefault);
|
||||||
compression = new TWJpegCompression();
|
compression = new TWJpegCompression();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, compression);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetDefault, compression);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -46,7 +46,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Reset);
|
||||||
compression = new TWJpegCompression();
|
compression = new TWJpegCompression();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, compression);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, compression);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -59,7 +59,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWJpegCompression compression)
|
public ReturnCode Set(TWJpegCompression compression)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.JpegCompression, Message.Set);
|
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);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.Get);
|
||||||
palette = new TWPalette8();
|
palette = new TWPalette8();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Get, palette);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Get, palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -32,7 +32,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.GetDefault);
|
Session.VerifyState(4, 6, DataGroups.Image, DataArgumentType.Palette8, Message.GetDefault);
|
||||||
palette = new TWPalette8();
|
palette = new TWPalette8();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.GetDefault, palette);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.GetDefault, palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -45,7 +45,7 @@ namespace NTwain.Triplets
|
|||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Palette8, Message.Reset);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Palette8, Message.Reset);
|
||||||
palette = new TWPalette8();
|
palette = new TWPalette8();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, palette);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, palette);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -59,7 +59,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWPalette8 palette)
|
public ReturnCode Set(TWPalette8 palette)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.Palette8, Message.Set);
|
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);
|
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.RgbResponse, Message.Reset);
|
||||||
response = new TWRgbResponse();
|
response = new TWRgbResponse();
|
||||||
return Dsm.DsmEntry(Session.GetAppId(), Session.SourceId, Message.Reset, response);
|
return Dsm.DsmEntry(Session.AppId, Session.SourceId, Message.Reset, response);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -34,7 +34,7 @@ namespace NTwain.Triplets
|
|||||||
public ReturnCode Set(TWRgbResponse response)
|
public ReturnCode Set(TWRgbResponse response)
|
||||||
{
|
{
|
||||||
Session.VerifyState(4, 4, DataGroups.Image, DataArgumentType.RgbResponse, Message.Set);
|
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.
|
/// Gets the app id used for the session.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <value>The app id.</value>
|
/// <value>The app id.</value>
|
||||||
TWIdentity ITwainStateInternal.GetAppId() { return _appId; }
|
TWIdentity ITwainStateInternal.AppId { get { return _appId; } }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Gets or sets a value indicating whether calls to triplets will verify the current twain session state.
|
/// 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.
|
/// The MSG structure in Windows for TWAIN use.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[StructLayout(LayoutKind.Sequential)]
|
[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)
|
public MESSAGE(IntPtr hwnd, int message, IntPtr wParam, IntPtr lParam)
|
||||||
{
|
{
|
||||||
_hwnd = hwnd;
|
_hwnd = hwnd;
|
||||||
|
Reference in New Issue
Block a user