Skip to content

Commit

Permalink
win32: mingw headers: mainly add LOAD_LIBRARY* values
Browse files Browse the repository at this point in the history
The LOAD_LIBRARY_* constants allow safer and more controlled load.

The others in winnt.h and wincon.h are relatively minor.
  • Loading branch information
avih committed Nov 18, 2024
1 parent dd2e5f8 commit 00b29f4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
7 changes: 7 additions & 0 deletions win32/include/winapi/winbase.h
Original file line number Diff line number Diff line change
Expand Up @@ -1849,6 +1849,13 @@ extern "C" {
#define LOAD_IGNORE_CODE_AUTHZ_LEVEL 0x10
#define LOAD_LINRARY_AS_IMAGE_RESOURCE 0x20
#define LOAD_LIBRARY_AS_DATAFILE_EXCLUSIVE 0x40
#define LOAD_LIBRARY_REQUIRE_SIGNED_TARGET 0x80
#define LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR 0x100
#define LOAD_LIBRARY_SEARCH_APPLICATION_DIR 0x200
#define LOAD_LIBRARY_SEARCH_USER_DIRS 0x400
#define LOAD_LIBRARY_SEARCH_SYSTEM32 0x800
#define LOAD_LIBRARY_SEARCH_DEFAULT_DIRS 0x1000
#define LOAD_LIBRARY_SAFE_CURRENT_DIRS 0x2000

WINBASEAPI DWORD WINAPI GetModuleFileNameA(HMODULE hModule,LPCH lpFilename,DWORD nSize);
WINBASEAPI DWORD WINAPI GetModuleFileNameW(HMODULE hModule,LPWCH lpFilename,DWORD nSize);
Expand Down
1 change: 1 addition & 0 deletions win32/include/winapi/wincon.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ extern "C" {
#define ENABLE_INSERT_MODE 0x20
#define ENABLE_QUICK_EDIT_MODE 0x40
#define ENABLE_EXTENDED_FLAGS 0x80
#define ENABLE_AUTO_POSITION 0x100
#define ENABLE_VIRTUAL_TERMINAL_INPUT 0x200

#define ENABLE_PROCESSED_OUTPUT 0x1
Expand Down
2 changes: 2 additions & 0 deletions win32/include/winapi/winnt.h
Original file line number Diff line number Diff line change
Expand Up @@ -2761,6 +2761,8 @@ typedef DWORD LCID;
#define PROCESS_SET_INFORMATION (0x0200)
#define PROCESS_QUERY_INFORMATION (0x0400)
#define PROCESS_SUSPEND_RESUME (0x0800)
#define PROCESS_QUERY_LIMITED_INFORMATION (0x1000)
#define PROCESS_SET_LIMITED_INFORMATION (0x2000)
#define PROCESS_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0xFFF)

#ifdef _WIN64
Expand Down

0 comments on commit 00b29f4

Please sign in to comment.