equal
deleted
inserted
replaced
103 HMODULE getCurrentModuleHandle() |
103 HMODULE getCurrentModuleHandle() |
104 { |
104 { |
105 // get module handle for the address of this function |
105 // get module handle for the address of this function |
106 LPCWSTR address = reinterpret_cast<LPCWSTR>(getCurrentModuleHandle); |
106 LPCWSTR address = reinterpret_cast<LPCWSTR>(getCurrentModuleHandle); |
107 HMODULE hmodule = NULL; |
107 HMODULE hmodule = NULL; |
108 if (!GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, |
108 if (!GetModuleHandleExW(GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS |
109 address, &hmodule)) |
109 | GET_MODULE_HANDLE_EX_FLAG_UNCHANGED_REFCOUNT, address, &hmodule)) |
110 { |
110 { |
111 JP_THROW(SysError(tstrings::any() << "GetModuleHandleExW failed", GetModuleHandleExW)); |
111 JP_THROW(SysError(tstrings::any() << "GetModuleHandleExW failed", |
|
112 GetModuleHandleExW)); |
112 } |
113 } |
113 return hmodule; |
114 return hmodule; |
114 } |
115 } |
115 |
116 |
116 tstring getCurrentModulePath() |
117 tstring getCurrentModulePath() |