| 37 | }; |
| 38 | |
| 39 | std::string getModuleNameFrom(LPCVOID pExcptAddr) |
| 40 | { |
| 41 | MEMORY_BASIC_INFORMATION memInfo; |
| 42 | char szOffender[MAX_PATH] = { "_unknown_" }; |
| 43 | if ( VirtualQuery(pExcptAddr, &memInfo, sizeof(memInfo)) ) |
| 44 | GetModuleFileNameA(memInfo.AllocationBase ? (HMODULE)memInfo.AllocationBase : GetModuleHandle(NULL), szOffender, MAX_PATH); |
| 45 | char *pszLast = strrchr(szOffender, '\\'); |
| 46 | return std::string(pszLast ? pszLast + 1 : szOffender); |
| 47 | } |
| 48 | |
| 49 | void GetCurrentProductVersion(WORD &w1, WORD &w2, WORD &w3, WORD &w4) |
| 50 | { |
no outgoing calls
no test coverage detected