Author Archives: Sheng Jiang 蒋晟

About Sheng Jiang 蒋晟

Microsoft MVP in Visual C , 2004- Forum moderator of the Visual C++ and .Net forums on CSDN Forum moderator of Chinese forums on Microsoft's MSDN forums

How To Determine When a Page Is Done Printing in WebBrowser Control

Note this post is originally written in 2012. It was lost when moving my web site from Windows Live Spaces to WordPress. I found a dead link to my web site on Stackoverflow and found an archive from archive.org. So … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

Troubleshooting a memory leak

Got called into a memory leak troubleshooting. The application was leaking memory at 1mb per second. In memory profiler, most of the growing memory are used by byte[] and RuntimeMethodHandle (growing at around a million per minute). Initially I thought … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

Icepocalypse 2021 冰狱 2021

this is my dairy about the winter storm occurred in Feb 2021. 这是我2021年二月冬季风暴的日记 Feb 13 Sat. 27-30F. Stockpile food (glad I did it). Heard ice building on roads, so instead I shopped on foot. Almost fell because of invisible ice. … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

微软拼音卡顿的问题

微软拼音最近每次激活的时候都要卡上个几分钟。而且不是一个程序只卡一次,中英文切换之后还会继续卡。 用了Process Monitor跟踪了一下,发现每次切换中英文的时候,微软拼音都会在%appdata%\Microsoft\InputMethod\Chs下面创建一个名字为UDPXXXX(这里XXXX是16进制数字).tmp的文件,我这个目录下有六万五千多个这样的文件。从命名风格来看,很明显是在调用GetTempFileName,而这个函数有65535个文件的限制,不删除文件的话,第65536次调用会失败,应该是微软拼音没有处理好调用这个函数失败的情况,也没有删除临时文件的代码,就卡住了。 目前的绕过这个问题的方法是把 del %appdata%\Microsoft\InputMethod\Chs\*.tmp /q 加到每日备份脚本。 已经向微软反映了这个问题。不知道微软为什么临时文件不放%TEMP%放应用程序目录下,以及为什么不定期清理自己创建的临时文件。

Rate this:

Posted in Uncategorized | Leave a comment

Today’s fake email of the day

Today’s fake email of the day Hi Dear, How are you doing hope you are fine and OK? I was just going through the Internet search when I found your email address ……. So you care about an article titled … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

Finding the right ruby version

I am installing eHMP on Centos 7. Centos 7 has ruby 2.0 out of box, thus the install chef-client -o workstation –config ~/Projects/vistacore/.chef/knife.rb fails with rb-notify version 0.10.0 needs Ruby 2.2.2 or newer Following the instructions at https://noobient.com/2019/02/12/installing-rvm-and-ruby-on-centos-7/ I got … Continue reading

Rate this:

Posted in eHMP | Tagged | Leave a comment

Fix sphinxcontrib-googleanalytics on Sphinx 1.8

The Google Analytics extension from python -m pip install  sphinxcontrib-googleanalytics does not work on Sphinx 1.8. When I run it, I get the following error Could not import extension sphinxcontrib.googleanalytics (exception: cannot import name ‘ExtensionError’ from ‘sphinx.application’ (c:\python37\lib\site-packages\sphinx\application.py)) Fix is … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

Blinking wifi icon and black screen on Surface 2

This is the second time I run into this problem after a Windows Update. First time was halfway through last year’s Microsoft MVP Summit and I had to Remote Desktop to my home machine with a spare android tablet and … Continue reading

Rate this:

Posted in Uncategorized | Leave a comment

如何在64位win10的VS2017环境下搭建汇编环境

用户AcmeContracted安装masm32失败,所以想知道是否能集成masm64到Visual Studio 2017中。 VS里面masm不是单独的,是C++工具集的一部分,而在VS2017里C++工具集不是默认安装的,所以要先安装C++工具集。 安装完之后创建个C++的Win32命令项目,然后在解决方案浏览器里选中项目节点,右键,选择Build Dependencies->Build Customisations,在弹出的对话框里选中masm,然后选择OK。这会使得你的项目里的新asm文件使用ml或者ml64编译(具体使用哪个取决于你的项目当前编译配置是32位还是64位)。 另外VS里面新建文件的选择里没有asm文件的模板,随便选个纯文本格式(.h,cpp,.txt,.html都行)的来替代,建完了把扩展名改成asm,然后在解决方案浏览器里右键点文件打开文件属性对话框,把项目类型改成Microsoft Macro Assembler。确定之后这个文件就会用masm来编译了,可以重新打开文件属性对话框检查编译时使用的命令行。 如果的项目在启用asm支持之前已经有了asm文件,这些asm文件的编译设置不会被VS2017版的覆盖(因为有可能在使用第三方的asm)。如果没有值得保留的旧编译设置,可以在解决方案浏览器里右键点文件,选择排除(注意不是删除),再把文件加回来。

Rate this:

Posted in Uncategorized | Leave a comment

Can we run 32 bit and 64 bit code in the same process?

User redstone001 wants to know if it is possible to run 32 bit and 64 bit code in the same process – maybe in a different thread? As Betteridge’s law of headlines say, any news ending with a question mark … Continue reading

Rate this:

Posted in Computers and Internet | Leave a comment