读书人

使用 twainpro 怎么获得扫描仪的序列号

发布时间: 2012-04-09 13:41:25 作者: rapoo

求救 使用 twainpro 如何获得扫描仪的序列号
想获得扫描仪的序列号 来控制一套软件只能使用一个扫描仪但代码写来写去 也不对,请教给位大大帮我看看

C# code
    twainProNet.CapTypeOut = PegasusImaging.WinForms.TwainPro4.tagenumCapType.TWCAP_ONEVALUE;twainProNet.Capability =PegasusImaging.WinForms.TwainPro4.tagenumCapability.TWCAP_USECAPADVANCEDFOREXTINFO;                  PegasusImaging.WinForms.TwainPro4.tagenumAdvancedCapability.CAP_SERIALNUMBER;                    twainProNet.CapExtInfoCount = 1;twainProNet.CapExtInfoIndex = 0;twainProNet.CapAdvanced = (int)PegasusImaging.WinForms.TwainPro4.tagenumAdvancedCapability.CAP_SERIALNUMBER;twainProNet.CapValueOut = (float)PegasusImaging.WinForms.TwainPro4.tagenumAdvancedCapability.CAP_SERIALNUMBER;


[解决办法]
扫描仪的没有开发文档吗?
[解决办法]
接触twainpro 的人怕很少,还不如更直接一点的描述问题
[解决办法]
代码也没能解释哪里不对。
[解决办法]
delphitwain 方法

{One value}
Value : String;
Container : TW_UINT16;
Handle : HGLOBAL;
ItemType : TW_UINT16;
//获取扫描仪序列号
if crSuccess=Twain.Source[CurrentSource].GetCapabilityRec(CAP_SERIALNUMBER,Handle,rcGet,Container) then
begin
Twain.Source[CurrentSource].GetOneValue(CAP_SERIALNUMBER,ItemType,Value,rcGet,Handle);
end;

Value就是扫描仪序列号

读书人网 >C#

热点推荐