Branch :
| Author | Commit | Date | CI | Message |
|---|---|---|---|---|
| fc7c011d | 2023-07-03 18:34:23 | Add missing check that section index in get_image_section() is valid Number is stored in NumberOfRvaAndSizes and it may be less than IMAGE_NUMBEROF_DIRECTORY_ENTRIES. | ||
| 519400bf | 2023-05-21 14:26:47 | Fix compilation with the first NT SDK First NT SDK available in the first 32-bit MSVC NT compiler does not provide some defines. Add them for compatibility. | ||
| 236d0f5e | 2023-05-21 14:23:11 | Fix compilation with old MSVC compiler Old pre-4.0 MSVC does not support _ReturnAddress() intrinsic. Provide for it simple implementation via inline assembly. | ||
| 1beb65cd | 2023-05-21 12:11:20 | Fix compilation with older SDK Do not use SIZE_T which is not defined in older SDK. There is only size_t type, so use it instead. Do not use IMAGE_DIRECTORY_ENTRY_COM_DESCRIPTOR which is not defined in older SDK. Use IMAGE_NUMBEROF_DIRECTORY_ENTRIES macro for checking if directory index is valid. In all SDKs is DataDirectory[] array size defined from IMAGE_NUMBEROF_DIRECTORY_ENTRIES macro. Cast members in IMAGE_EXPORT_DIRECTORY and IMAGE_DIRECTORY_ENTRY_IMPORT to DWORD as in older SDK they are defined as PDWORD and compiler throws error 'cannot add two pointers'. | ||
| d78c6266 | 2022-12-08 21:37:10 | Add Windows ARM64 support | ||
| f5cf3313 | 2022-12-01 14:05:37 | Fix CMake include directive when using wrappers like meson. | ||
| e34fb598 | 2022-03-11 22:50:30 | Replace magic numbers by sdk macros in get_image_section() | ||
| 318030d5 | 2021-12-21 01:09:09 | Prefer usage of thread-safe function SetThreadErrorMode() instead of process-global function SetErrorMode() Use GetProcAddress() wrapper as SetThreadErrorMode() is not available on older Windows versions. | ||
| fe1e4751 | 2021-12-21 01:07:19 | Try to avoid compile warning: cast between incompatible function types from ‘FARPROC’ warning: cast between incompatible function types from ‘FARPROC’ {aka ‘long long int (*)()’} to ‘BOOL (*)(DWORD, const CHAR *, struct HINSTANCE__ **)’ {aka ‘int (*)(long unsigned int, const char *, struct HINSTANCE__ **)’} [-Wcast-function-type] | ||
| 36b92340 | 2021-03-15 11:21:09 | dladdr: const void *addr on unix the addr argument seems to be const fix that for consistency | ||
| 9e40646c | 2021-02-03 21:01:24 | Fix noinline for older compiler versions (e.g. Visual Studio 6.0) Visual Studio 6.0 does not support __declspec(noinline) and throw error. Add checks for compilers which support noinline to prevent compile errors. | ||
| 7da10545 | 2021-02-03 21:00:56 | Define ULONG_PTR for older SDK If compiling with _WIN32_WINNT target prior 0x0500 then SDK does not define ULONG_PTR type. Such systems are only 32bit so define it explicitly to 32bit type ULONG. | ||
| d1a0d28f | 2021-02-03 21:00:28 | Fix MSVC 14.00 compile warning: warning C4244: '=' : conversion from 'ULONG_PTR' to 'char', possible loss of data | ||
| 06fea3fe | 2021-02-03 20:59:58 | Add helper function MyGetModuleHandleFromAddress() This function implements calling GetModuleHandleExA() with correct flags to retrieve hModule from passed address. To allow compilation also with older compilers and environments (like WDK) with any _WIN32_WINNT value, retrieve pointer to this function via GetProcAddress(). And as a fallback implementation use old code via VirtualQuery() which was there prior commit 8ec5ffef2eca. | ||
| 0e9d85a9 | 2021-02-03 20:59:18 | Fix helper function MyEnumProcessModules() Call SetErrorMode(SEM_FAILCRITICALERRORS) prior opening Psapi.dll library to avoid GUI error messages. Close Psapi.dll library via FreeLibrary() if symbol was not retrieved to prevent possible memory leaks. Try to get K32EnumProcessModules symbol from Kernel32.dll library as it is preferred way how to call EnumProcessModules() on Windows 7 and newer versions. If retrieving EnumProcessModules symbol failed with both methods then do not try it again on next MyEnumProcessModules() function call. | ||
| c172ee21 | 2021-02-03 20:58:39 | Avoid calling SetLastError() and GetLastError() internally There is no need for propagating internal errors via SetLastError() and GetLastError() calls. Just use additional argument for save_err_str() function. Also dlfcn API is POSIX and does not use GetLastError(). | ||
| b89f8932 | 2021-02-03 20:58:15 | Move hCurrentProc variable to scope where is used | ||
| f7e7a5d7 | 2021-02-03 20:57:40 | Fix some style issues | ||
| b46da884 | 2021-01-29 14:00:30 | Remove duplicate checks for NULL pointers is_valid_address() already rejects NULL addresses, so there is no need to check address for NULL. | ||
| e53ecd53 | 2021-01-29 13:59:41 | Remove code for finding symbol name in import table It is not required as import table can use only symbols which are exported and therefore are in export table. So if symbol is not found in export table it cannot be in import table. | ||
| 86a41b92 | 2021-01-25 23:27:22 | Function dladdr() now retrieve symbol name and symbol address from both export and import tables dladdr tests for Windows now should always pass like on other systems. | ||
| 0ea2334d | 2020-12-11 14:32:52 | Add function dladdr() and associated test application test-dladdr | ||
| d230e1ca | 2020-12-13 14:48:44 | Rewrite function save_err_ptr_str() to not use sprintf() sprintf() is marked by MSVC as unsafe and suppressing compile warning does not work. It is still generated on AppVeyor. So rewrite code for converting pointer number to string via open coded for-loop and do not use unsafe sprintf() function anymore. New code correctly handles both 32bit and 64bit variants and does not use any #ifdef _MSC_VER anymore. | ||
| f0ac8495 | 2020-08-25 23:34:19 | Move cmake targets into sub directories |