Windows Vista: Unable to load DLL 'x.dll': Invalid access to memory location. (DllNotFoundException)

前端 未结 6 1315
伪装坚强ぢ
伪装坚强ぢ 2020-12-19 16:19

I was testing on a customer\'s box this afternoon which has Windows Vista (He had home, but I am testing on a Business Edition with same results).

We make use of a .

6条回答
  •  一生所求
    2020-12-19 16:32

    @Martín

    The reason you were not getting the UAC prompt is because UAC can only change how a process is started, once the process is running it must stay at the same elevation level. The UAC will prompt will happen if:

    • Vista thinks it's an installer (lots of rules here, the simplest one is if it's called "setup.exe"),
    • If it's flagged as "Run as Administrator" (you can edit this by changing the properties of the shortcut or the exe), or
    • If the exe contains a manifest requesting admin privileges.

    The first two options are workarounds for 'legacy' applications that were around before UAC, the correct way to do it for new applications is to embed a manifest resource asking for the privileges that you need.

    Some program, such as Process Explorer appear to elevate a running process (when you choose "Show details for all process" in the file menu in this case) but what they really do is start a new instance, and it's that new instance that gets elevated - not the one that was originally running. This is the recommend way of doing it if only some parts of your application need elevation (e.g. a special 'admin options' dialog).

提交回复
热议问题