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
Conversation
dictionaries/win32/src/generate.py
Outdated
# 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()] |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
Thanks for doing this. |
I think a Win32 dictionary is useful for other people as well. |
I realized the generator might be missing words that are used in |
(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.