Given an appropriate manifest that sets uiAccess="true", should a win32 program (that works fine on other Windows7 systems) be able to get a valid handle back from SetWindowsHookEx when running on Windows7 (32bit) on Mac Mini using Parallels ?
This is the line of Delphi XE4 code that calls the API
HookHandle := SetWindowsHookEx(WH_JOURNALPLAYBACK, @Playback, hInstance, 0);
I keep getting "access denied" as the system error returned in HookHandle.
I have tried many variations of my manifest syntax and am seriously wondering whether this is just some limitation of the Mac Mini / Parallels environment. The user invoking the program is an Administrator. UAC is enabled. I have tried Run as Administrator; no difference.
My manifest file follows.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
<assemblyIdentity type="win32" name="FFHotKeys" version="1.1.0.0 processorArchitecture="*"/>
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
<security>
<requestedPrivileges>
<requestedExecutionLevel level="asInvoker" uiAccess="true"/>
</requestedPrivileges>
</security>
</trustInfo>
<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
<application>
<!--The ID below indicates application support for Windows 7 -->
<supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/>
</application>
</compatibility>
</assembly>
I have tried stting the level to each of these
level="asInvoker"
level="requireAdministrator"
level="highestAvailable"
and that did not solve the 'access denied' problem.
Note: I am including my manifest via .rc file containing
1 24 "FFHotKeys.exe.manifest"
rather than by the Custom Manifest feature under Project > Options. I have "Enable Runtime Themes" and a blank custom manifest. I tried it the other way but with slightly different .manifest contents.
Note: when I check the resources with XN_Resource_Editor, there is an "XP Theme Manifest" resource containing exactly the XML expected. There are also 2 VCLSTYLE resources. Thank you.