Change a few cap values to uint.

This commit is contained in:
Eugene Wang
2021-04-25 21:11:52 -04:00
parent cc58a6e093
commit a4524299e9
2 changed files with 15 additions and 3 deletions

View File

@@ -94,6 +94,18 @@ namespace Net5Console
} }
Console.WriteLine(); Console.WriteLine();
sts = caps.ICAP_PIXELTYPE.SetOrConstraint(MSG.SET, TWPT.GRAY);
if (sts == STS.SUCCESS)
{
Console.WriteLine("Successfully set pixel type to GRAY.");
}
else
{
Console.WriteLine($"Failed set pixel type: {sts}.");
}
Console.WriteLine();
sts = session.StartCapture(false); sts = session.StartCapture(false);
if (sts == STS.SUCCESS) if (sts == STS.SUCCESS)
{ {

View File

@@ -1331,12 +1331,12 @@ namespace NTwain
} }
} }
private CapWrapper<int> _printerIndex; private CapWrapper<uint> _printerIndex;
public CapWrapper<int> CAP_PRINTERINDEX public CapWrapper<uint> CAP_PRINTERINDEX
{ {
get get
{ {
return _printerIndex ?? (_printerIndex = new CapWrapper<int>(_twain, CAP.CAP_PRINTERINDEX)); return _printerIndex ?? (_printerIndex = new CapWrapper<uint>(_twain, CAP.CAP_PRINTERINDEX));
} }
} }