FindPrivateKey 在 Windows 7 64 位下不起作用
我已经下载了 .net 示例 FindPrivateKey,为框架 4.0 编译,尝试了不同的平台(32 位、64 位、任何 CPU),但它不起作用。总是同样的错误:无法在动态链接库comctl32.dll中找到序号345。我使用 Windows 7 企业版,64 位版本。 此方法调用失败: matches = X509Certificate2UI.SelectFromCollection(store.Certificates, "选择证书", "选择证书以查找关联私钥文件的位置:", X509SelectionFlag.SingleSelection); 这里可能有什么问题?
亚历山大
I've downloaded .net sample FindPrivateKey, compiled for framework 4.0, tried for different platforms (32bit, 64bit, Any CPU) but it didn't work. Always the same error: the ordinal 345 could not be located in the dynamic link library comctl32.dll. I use Windows 7 Enterprise, 64 bit version.
This method call fails: matches = X509Certificate2UI.SelectFromCollection(store.Certificates, "Select certificate", "Select the certificate to find the location of the associated private key file:", X509SelectionFlag.SingleSelection);
What could be problem here?
Aleksandar
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
今天早上我遇到了同样的问题(无法找到序号 345...)...
我已经在 3 台不同的 Win7 64 位 PC 上尝试过该应用程序;但只有其中之一会抛出异常。我发现问题出在 comctl32.dll 库的使用上(与我的不同)。
您可以执行这段代码来检查您正在使用哪个版本的库:
然后添加清单并强制应用程序使用特定的库版本:
[项目]->添加新项目->应用清单
并编辑它添加以下依赖部分。
我希望这对你有用......
This morning I’ve encountered the same problem (ordinal 345 could not be located ...)…
I’ve tried the application in 3 different PC with Win7 64bit; but only in one of these the exception throws. I found that the problem was in the use of the comctl32.dll library (which was different from mine).
You can execute this piece of code in order to check which version of the library you are using:
Then add a manifest and force the application to use a specific library version:
[Project] -> Add new item -> Application manifest
And edit it adding the following dependency part.
I hope this works for you...