惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
云风的 BLOG
云风的 BLOG
T
Threatpost
WordPress大学
WordPress大学
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
PCI Perspectives
PCI Perspectives
T
The Exploit Database - CXSecurity.com
Y
Y Combinator Blog
雷峰网
雷峰网
爱范儿
爱范儿
The Hacker News
The Hacker News
Last Week in AI
Last Week in AI
Simon Willison's Weblog
Simon Willison's Weblog
T
Tor Project blog
S
Securelist
宝玉的分享
宝玉的分享
L
LangChain Blog
O
OpenAI News
AI
AI
P
Privacy International News Feed
L
LINUX DO - 最新话题
D
DataBreaches.Net
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
Attack and Defense Labs
Attack and Defense Labs
罗磊的独立博客
M
MIT News - Artificial intelligence
Security Archives - TechRepublic
Security Archives - TechRepublic
月光博客
月光博客
博客园 - 【当耐特】
T
Tailwind CSS Blog
C
Cybersecurity and Infrastructure Security Agency CISA
H
Help Net Security
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
博客园_首页
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
Hacker News - Newest:
Hacker News - Newest: "LLM"
腾讯CDC
Jina AI
Jina AI
The Last Watchdog
The Last Watchdog
K
Kaspersky official blog
Webroot Blog
Webroot Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Blog — PlanetScale
Blog — PlanetScale
MyScale Blog
MyScale Blog
MongoDB | Blog
MongoDB | Blog
P
Proofpoint News Feed
Recorded Future
Recorded Future
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
博客园 - 三生石上(FineUI控件)
The Cloudflare Blog

博客园 - 置身珠海,学习与奋斗

【转】WPF获取路径解读 善用Wink,将电脑操作录屏为flash (更新图片) [转]ClickOnce部署出现 系统必备的安装位置未设置为组件供应商的网站,无法在磁盘上找到 dotNetFx40LP_Client_x86_x64cs.exe 问题的解决方案 D60 单反相机拍照后,反光板无法正常弹回,报错的解决办法。 关于ListBox绑定到自定义对象 VS 全部补丁包(20100730) 和谐UAC与应用程序配置,抛砖引玉,希望完美解决问题。 论企业信息化的三个阶段:技,术,道 关于ClickOnce在企业内部的应用 中国式管理 Virtual PC 2007 虚拟网络配置 红旗飘扬 咱也写个小写数字转大写金额 ,纯粹字符串操作实现 中国人成功十要 有没有朋友做过动态表结构的,请教一下 自定义app_offline.htm,让网站升级提示更专业 使用PPC的朋友慎用 星空极速3.2.070416_GD 关于89S51单片机数码管显示的小工具 重新启动IIS的小工具
关于 Winform 下 ReportViewer 打印异常
置身珠海,学习与奋斗 · 2007-12-07 · via 博客园 - 置身珠海,学习与奋斗

想必有不少朋友做过 WinForm 下的 ReportViewer 应用,在功能打印和导出PDF时会遇到一个异常:

检测到 PInvokeStackImbalance
Message: 对 PInvoke 函数“Microsoft.ReportViewer.Common!Microsoft.ReportingServices.Rendering.ImageRenderer.CompositionPDF+WindowsGDIWrapper::GetGlyphIndicesW”的调用导致堆栈不对称。原因可能是托管的 PInvoke 签名与非托管的目标签名不匹配。请检查 PInvoke 签名的调用约定和参数与非托管的目标签名是否匹配。

关于这个问题,MS语焉不详,而其它通过修改DLL引用方法的方式对于 Microsoft.ReportViewer.Common 和 Microsoft.ReportViewer.WinForms 也是无能为力。

近日,本人在测试程序时发现,这个问题总是在调试时发生,而程序发布之后,这个问题就不再出现了。

做了几个小测试,发现,删除  xxxxxx.pdb (放置ReportViewer控件的)后,测试就可以顺利通过,

问题解决了,探讨原因:调试宿主的签名与程序签名不一致,致使某些异常发生,引发这个DLL的调用错误。