Added musings on runnig as Console app.

This commit is contained in:
soukoku
2014-04-06 15:22:11 -04:00
parent 0bd58e5e48
commit 006d33b451
7 changed files with 272 additions and 5 deletions

View File

@@ -309,10 +309,7 @@ namespace NTwain
/// <exception cref="ArgumentNullException">context</exception>
public ReturnCode EnableSource(SourceEnableMode mode, bool modal, HandleRef windowHandle, SynchronizationContext context)
{
if (Environment.OSVersion.Platform == PlatformID.Win32NT)
{
if (context == null) { throw new ArgumentNullException("context"); }
}
if (context == null) { throw new ArgumentNullException("context"); }
Debug.WriteLine(string.Format("Thread {0}: EnableSource.", Thread.CurrentThread.ManagedThreadId));
@@ -378,6 +375,8 @@ namespace NTwain
/// <summary>
/// Forces the stepping down of an opened source when things gets out of control.
/// Used when session state and source state become out of sync.
/// This should be called on the Thread that originally called the <see cref="EnableSource"/>
/// method, if applicable.
/// </summary>
/// <param name="targetState">State of the target.</param>
public void ForceStepDown(int targetState)