ntwain
ntwain copied to clipboard
TWIdentity.CreateFromAssembly throws ArgumentException whenever the referenced assembly's ProductName is longer than 33 chars
The string value has exceeded the maximum length allowed.
at NTwain.Internals.Extensions.VerifyLengthUnder(String value, Int32 maxLength) in C:\Users\vonzs\Downloads\ntwain-3\src\NTwain\Internals\Extensions.cs:line 20
at NTwain.Data.TWIdentity.set_ProductFamily(String value) in C:\Users\vonzs\Downloads\ntwain-3\src\NTwain\Data\TwainTypesExtended.cs:line 1727
at NTwain.Data.TWIdentity.Create(DataGroups supportedGroups, Version version, String manufacturer, String productFamily, String productName, String productDescription) in C:\Users\vonzs\Downloads\ntwain-3\src\NTwain\Data\TwainTypesExtended.cs:line 1775
at NTwain.Data.TWIdentity.CreateFromAssembly(DataGroups supportedGroups, Assembly assembly) in C:\Users\vonzs\Downloads\ntwain-3\src\NTwain\Data\TwainTypesExtended.cs:line 1750
Maybe NTwain could just call Substring
on them, instead of throwing an exception?