Bootstrap

ShellExecuteEX打开iqy文件导致excel hang的原因分析

1. 问题

当在console中调用API ShellExecuteEx打开"test.iqy"文件时,发现excel会hang住,console退出后excel才会响应,但直接双击"test.iqy"是没有问题的,有意思的是这个情况只有在xp发生,在win7上没有这个问题。

2. 重现步骤

重现环境:XP sp3 / Office 2007(其他office版本应该也可以,没有测试)

https://files.cnblogs.com/files/organic/iqy_test.zip

1> 解压iqy_test.zip

2> 运行http_server.py(需先安装python)

3> 执行"shell_execute.exe test.iqy"

shell_execute.exe的主要code:

;