Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GetAsyncKeyState and GetKeyState Argument Type #31

Closed
GCuser99 opened this issue May 25, 2024 · 3 comments
Closed

GetAsyncKeyState and GetKeyState Argument Type #31

GCuser99 opened this issue May 25, 2024 · 3 comments

Comments

@GCuser99
Copy link

Not a bug, but perhaps a minor improvement since it looks like you have the VirtualKeyCodes Enum defined:

'Currently in WDL:
Public DeclareWide PtrSafe Function GetAsyncKeyState Lib "user32" (ByVal VKey As Long) As Integer
Public DeclareWide PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As Long) As Integer

'Proposed changes:
Public Declare PtrSafe Function GetAsyncKeyState Lib "user32" (ByVal VKey As VirtualKeyCodes) As Integer
Public Declare PtrSafe Function GetKeyState Lib "user32" (ByVal nVirtKey As VirtualKeyCodes) As Integer
@fafalone
Copy link
Owner

fafalone commented May 26, 2024

But that's what it is already? And has been as far back as I checked (v5.2)

tB has native definitions matching your prototype; if you searched for those inside packages...

@GCuser99
Copy link
Author

Oh, you are right! Looks like I was looking at the wrong tB package (WindowsAPI.twin in WInNativeCommonCtls). Sorry about that!

@fafalone
Copy link
Owner

fafalone commented May 26, 2024

No worries, happens to all of us. Definitely report these kinds of things for APIs. I know in some of the interface sections some work needs to be done with these substitutions; mostly the large media sets like MediaFoundation, CoreAudio, and DirectX where I didn't do it a long time ago in oleexp and imported in bulk from there. So those don't worry, known issue, but APIs, other interface sets? Sure, when you come across them-- don't worry about going looking deliberately.

Can't wait for TypeHint to be allowed in UDTs, as you've probably seen I've been provisioning for a long time now to associate enums with non-Long members 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants