Posts tagged process
Can we run 32 bit and 64 bit code in the same process?
- 18 June 2018
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 can be answered with the word no. But this isn’t news, so … the answer is … yeah? Kind of.
When you get a System.BadImageFormatException. maybe you indeed have a bad system image.
- 08 February 2013
I am getting a StackOverflowException with two functions repeating on the call stack, one is the constructor of System.BadImageFormatException, another is System.Environment.GetResourceStringLocal.
Since the call that throws the stack overflow is to a web service proxy defined in the same project as the application, there isn’t a 32bit/64bit mismatch here (32bit machine with every project targeting x86), unlike almost all other discussions on the internet about this exception.
How to restart Windows Explorer programmatically using Restart manager
- 22 January 2013
You can download source code of this post at jiangsheng/Samples
For shell extension programmers, restart Windows Explorer is one of steps in their setup programs. A programmer may also want to force some shell setting changes that would only be read by Explorer on start up. For example, this posts is inspired by a programmer who want to toggle task bar layout automatically depending on the screen resolution, and is used to demonstrate the new Windows Vista restart manager API like RmStartSession, RmRegisterResources, RmGetList, RmShutdown, RmRestart and RmEndSession.
限制应用程序的实例数目
- 22 January 2005
某些应用程序处理紧缺资源,例如可擦写光驱、串口或者大量内存,通常不希望这种应用程序的多个实例同时运行。
实际上你没有办法限制用户只能启动一次。你可以做到的是在应用程序启动之后查找是否用户启动了另一个实例。如果没有找到现存的实例,应用程序以正常方式启动。否则,通常的处理是退出。
跨进程访问共享内存的权限问题
- 24 June 2004
问:
我在服务器上用 CreateFileMapping 创建了一段共享内存。让这个exe始终在服务器上跑。同时,别的用户在客户端用IE访问服务器,将要查询的数据通过C#制作的网页提交上来,服务器得到网页参数后,建立一个COM对象访问上一个exe的共享内存,然后将在共享内存中的查询结果返回给客户。问题是现在这个COM无法用openmapping访问exe的共享内存,提示 访问拒绝 。而我在服务器上随便建议一个工程编译成exe,文件就可访问这段共享内存!!为何在网页中就不成?COM难道要有什么权限设置.两个进程之间的权限整合方法是什么?怎么用DACL?