首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

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

2012-04-09 
求救 使用 twainpro 如何获得扫描仪的序列号想获得扫描仪的序列号 来控制一套软件只能使用一个扫描仪但代

求救 使用 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就是扫描仪序列号

热点排行