SolvedGlobal Hotkeys

Posts 16–23 of 23 · Page 2 of 2
well, if your still online in about an hour and a half, i can help you out via TeamViewer or some shit.
Wish I could see the original source to solve (not bypass) the issue.
I assume your issue (may be) here:


Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer
I have seen an issue where GetAsyncKeyState doesn't work properly on Windows 7 if Declared as Integer, Should (could) be declared as Short .

Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
Try it, Problem should be solved instead of "Working Around It"
Quote Originally Posted by NextGen1 View Post
Wish I could see the original source to solve (not bypass) the issue.
I assume your issue (may be) here:


Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer
I have seen an issue where GetAsyncKeyState doesn't work properly on Windows 7 if Declared as Integer, Should (could) be declared as Short .

Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
Try it, Problem should be solved instead of "Working Around It"
Subtlety isn't your strong suit I'm guessing?
Quote Originally Posted by NextGen1 View Post
Wish I could see the original source to solve (not bypass) the issue.
I assume your issue (may be) here:


Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Integer
I have seen an issue where GetAsyncKeyState doesn't work properly on Windows 7 if Declared as Integer, Should (could) be declared as Short .

Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
Try it, Problem should be solved instead of "Working Around It"

Code:
Public Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Int32) As Int16
Always worked for me on every OS.
@Blubb1337
I know 64Bit Win7 def has the issue. But I was talking about Integer not In16
Essentially Int16 is to Short as Int32 is to Integer.

@Jason
Guess not.
Woot thanks nextgen, and this will work on xp and vista too i'm assuming?
For future reference, when you're referencing API functions from the windows libraries (user32.dll, kernel32.dll, psapi.dll....etc), it's best to either check the method signature on MSDN:

GetAsyncKeyState function << GetAsyncKeyState
or take a look on PInvoke for an accepted method signature:
pinvoke.net: GetAsyncKeyState (user32) << GetAsyncKeyState
@Blubb1337, Short and Int16 are essentially the same thing. And I often get my declerations from PInvoke.net too, great site.
Posts 16–23 of 23 · Page 2 of 2

Post a Reply

Similar Threads

Tags for this Thread

None

Need help?