SetWindowsHookEx failed
-
Look, guys, I have a code that worked properly under Windows XP 32 bit. hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, hInst, 0). But under Windows 7 64 bit this call failed and I got System Error Message "Acces denied" I tried this: hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, hInst, GetCurrentThreadId()) and this hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, (HINSTANCE)NULL, GetCurrentThreadId()) and got "This hook can be set only globally". Any ideas how to resolve the situation?
-
Look, guys, I have a code that worked properly under Windows XP 32 bit. hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, hInst, 0). But under Windows 7 64 bit this call failed and I got System Error Message "Acces denied" I tried this: hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, hInst, GetCurrentThreadId()) and this hHookMsg = SetWindowsHookEx(WH_JOURNALPLAYBACK, hkprc, (HINSTANCE)NULL, GetCurrentThreadId()) and got "This hook can be set only globally". Any ideas how to resolve the situation?
They have put security around that sort of thing and you probably have to be running as administrator and it's likely going to throw a UAC to user to confirm it is okay. Goto MSDN and look at the documentation.
In vino veritas
-
They have put security around that sort of thing and you probably have to be running as administrator and it's likely going to throw a UAC to user to confirm it is okay. Goto MSDN and look at the documentation.
In vino veritas
Sure. I do not need this option- it was intended to demonstrate how my prog works to another users. And they do no not like (and for a reason) when some soft wants administrative privileges.
-
Sure. I do not need this option- it was intended to demonstrate how my prog works to another users. And they do no not like (and for a reason) when some soft wants administrative privileges.
Member 14105155 wrote:
And they do no not like (and for a reason) when some soft wants administrative privileges.
Well they are going to have to get used to it. Windows 10 (7 is out of support in a few days) uses this extensively in order to protect the users' systems from malicious software.
-
Member 14105155 wrote:
And they do no not like (and for a reason) when some soft wants administrative privileges.
Well they are going to have to get used to it. Windows 10 (7 is out of support in a few days) uses this extensively in order to protect the users' systems from malicious software.
Well, this is the reason to write soft that works without such privileges.
-
Well, this is the reason to write soft that works without such privileges.
-
You do not have a choice. The operating system sets the rules, and your software must work within those rules.
I do have. A program can ask a user if he let it run with privileges, but users dislike such soft. Therefore, the choice exists, but it is very poor one.
-
I do have. A program can ask a user if he let it run with privileges, but users dislike such soft. Therefore, the choice exists, but it is very poor one.