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

Add Win32 API names dictionary #708

Merged
merged 15 commits into from Oct 18, 2021

Conversation

LuizZak
Copy link
Contributor

@LuizZak LuizZak commented Oct 17, 2021

(in WIP while I investigate the generator not collecting enumerators behind typedefs correctly.)

When working with Win32 APIs, a lot of the commonly used nomenclature and identifiers can be triggered by the spell checker, like LPCWSTR, HRESULT, wcsnicmp, uuidof, etc., so I decided to tackle that with a ready-to-use, comprehensive dictionary that can be easily generated by code.

I created a python generator that sweeps an installed Windows SDK and extracts publicly-available APIs and constants to generate a (quite hefty, actually) dictionary that I hope will be useful for people doing low-level Win32 development.

I'm unsure if this is fit for this repository or if I'm better off creating a separate repo myself, so I'm opening a PR to check if it's an ok addition.

dictionaries/swift/CHANGELOG.md Outdated Show resolved Hide resolved
dictionaries/swift/package.json Outdated Show resolved Hide resolved
dictionaries/win32/samples/stdafx.h Show resolved Hide resolved
# Split around numbers
matches = flatten([re.split(r'[0-9]+', term) for term in matches])

return [term.lower() for term in matches if len(term) > 3 and not term.isnumeric()]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is better to keep the case. The spell checker is case sensitive.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See #589 (comment) for a discussion.

@Jason3S
Copy link
Collaborator

Jason3S commented Oct 17, 2021

Thanks for doing this.

@Jason3S
Copy link
Collaborator

Jason3S commented Oct 17, 2021

@LuizZak,

I think a Win32 dictionary is useful for other people as well.

@LuizZak
Copy link
Contributor Author

LuizZak commented Oct 17, 2021

I realized the generator might be missing words that are used in #if checks on SDK headers that the user can #define on their own code, but this is a good start!

@LuizZak LuizZak changed the title Add Win32 API names dictionary [WIP] Add Win32 API names dictionary Oct 17, 2021
@LuizZak LuizZak changed the title [WIP] Add Win32 API names dictionary Add Win32 API names dictionary Oct 17, 2021
@Jason3S Jason3S merged commit fc2a758 into streetsidesoftware:main Oct 18, 2021
@LuizZak LuizZak deleted the win32-api-names branch October 18, 2021 14:39
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

Successfully merging this pull request may close these issues.

None yet

2 participants