I am trying to use a CBT hook to receive HCBT_MOVESIZE notifications. It works fine for all applications when I run my program from a folder on my desktop. When I install the application to the "Program Files" or "Program Files (x86" folder I only receive notifications for my own application. The .exe file is signed and works perfectly in Windows XP. I am only receiving these errors in Vista x86/x64. Can anyone offer any suggestions on how to troubleshoot this? Thanks!
+3
A:
Might be a UIPI issue:
User Interface Privilege Isolation (UIPI) implements restrictions in the windows subsystem that prevents lower-privilege applications from sending window messages or installing hooks in higher-privilege processes.
from Microsoft's Windows Integrity Mechanism Design
jdigital
2009-06-01 22:47:04
The strange thing is that it works fine until I copy the files to the "Program Files" folder. I haven't been able to find any docs that say that folder is more restrictive.
Jon Tackabury
2009-06-01 23:11:55
Search the article for "Program Files" and you'll see that there is at least one rule that might explain the difference between Desktop and Program Files.
jdigital
2009-06-02 00:47:44
According to that article, the only way it should work is when it is in the "Program Files" folder, but I'm seeing the opposite behaviour. :(
Jon Tackabury
2009-06-02 14:37:20
Have you tried implementing the UIAccess security attribute as described in the article?
jdigital
2009-06-02 17:31:42
I have. I have a manifest file embedded in the application and the DLLs. I have it set to "asInvoker" and "UIAccess=true".
Jon Tackabury
2009-06-02 20:16:36
Have you checked the return value of SetWindowsHookEx?
jdigital
2009-06-03 01:27:04
If SetWindowsHookEx is not returning an error, run Process Explorer (http://technet.microsoft.com/en-us/sysinternals/bb896653.aspx) to see if you DLL is getting loaded into other processes.
jdigital
2009-06-03 01:36:59