wpf XP 上的 WIA 扫描问题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/12793576/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
WIA Scanning issues on XP
提问by Chrisjan Lodewyks
I have a WPF application that I am using to scan documents to a users mailbox etc.
我有一个 WPF 应用程序,用于将文档扫描到用户邮箱等。
When debugging the application on my 32bit Windows 7 professional machine all goes according to plan, as well as the deployed version on another 32bit Windows 7 machine.
在我的 32 位 Windows 7 专业机器上调试应用程序时,一切都按计划进行,以及在另一台 32 位 Windows 7 机器上部署的版本。
When I deploy to a XP machine and try to start a scan I get the following error:
当我部署到 XP 机器并尝试开始扫描时,我收到以下错误:
Retrieving the COM class factory for component with CLSID {850D1D11-70F3-4BE5-9A11-77AA6B2BB201} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).
由于以下错误,检索具有 CLSID {850D1D11-70F3-4BE5-9A11-77AA6B2BB201} 的组件的 COM 类工厂失败:80040154 类未注册(来自 HRESULT 的异常:0x80040154 (REGDB_E_CLASSNOT)。
Any suggestions?
有什么建议?
回答by Richard Friend
The win 7 version does not work on xp - you could try downloading this version for XP.
win 7 版本在 xp 上不起作用 - 您可以尝试为 XP 下载此版本。
回答by Kayot
To make deployment simpler, turn the files from Richard Friend's Answer into an Inno installer.
为了使部署更简单,请将 Richard Friend's Answer 中的文件转换为 Inno 安装程序。
[Setup]
AppId={{4D9ADCF1-F6B4-4790-8B21-3C9F93346638}}
AppName="Microsoft Windows XP x86 WIA 2.0 Installer"
AppVersion="2.0"
OutputBaseFilename="Microsoft Windows XP x86 WIA 2.0 Installer"
Compression=lzma2/ultra64
CreateAppDir=no
Uninstallable=no
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: Files\wiaaut.chi; DestDir: {win}\HELP; Flags: onlyifdoesntexist
Source: Files\wiaaut.chm; DestDir: {win}\HELP; Flags: onlyifdoesntexist
Source: Files\wiaaut.dll; DestDir: {sys}; Flags: onlyifdoesntexist regserver
I just did that since I have to deploy this in a small office and it works. I'm putting it on x86 machines only. You might have to tweak it a bit to work on x64 machines.
我只是这样做了,因为我必须在一个小办公室中部署它并且它可以工作。我只把它放在 x86 机器上。您可能需要稍微调整一下才能在 x64 机器上工作。

