Fix wrong cap call for Get.

This commit is contained in:
Eugene Wang
2025-11-20 20:28:07 -05:00
parent 8949b36833
commit 1173c11961
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<PropertyGroup> <PropertyGroup>
<!--change these in each release--> <!--change these in each release-->
<VersionPrefix>4.0.0.0</VersionPrefix> <VersionPrefix>4.0.0.0</VersionPrefix>
<VersionSuffix>alpha.17</VersionSuffix> <VersionSuffix>alpha.18</VersionSuffix>
<!--keep it the same until major # changes--> <!--keep it the same until major # changes-->
<AssemblyVersion>4.0.0.0</AssemblyVersion> <AssemblyVersion>4.0.0.0</AssemblyVersion>
+1 -1
View File
@@ -180,7 +180,7 @@ namespace NTwain
public STS GetCapValues<TValue>(CAP cap, out ValueContainer<TValue> value) where TValue : struct public STS GetCapValues<TValue>(CAP cap, out ValueContainer<TValue> value) where TValue : struct
{ {
value = new ValueContainer<TValue> { ContainerType = TWON.DONTCARE }; value = new ValueContainer<TValue> { ContainerType = TWON.DONTCARE };
var sts = GetCapCurrent(cap, out TW_CAPABILITY twcap); var sts = GetCapValues(cap, out TW_CAPABILITY twcap);
if (sts.RC == TWRC.SUCCESS) if (sts.RC == TWRC.SUCCESS)
{ {
value.ContainerType = twcap.ConType; value.ContainerType = twcap.ConType;