HMODULE GetCurrentModule()
{ // NB: XP+ solution!
HMODULE hModule = NULL;
GetModuleHandleEx(
GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS,
(LPCTSTR)GetCurrentModule,
&hModule);
return hModule;
}
More Related Contents:
- Getting CURRENT path to own executable (C++)
- How do I link to a library with Code::Blocks?
- How to detect win32 process creation/termination in c++
- What are the different calling conventions in C/C++ and what do each mean?
- How do I programmatically get the version of a DLL or EXE file?
- How to read a value from the Windows registry
- Win32 programming hiding console window
- Undefined reference to WinMain (C++ MinGW)
- How do I redirect output to a file with CreateProcess?
- Keyboard Input & the Win32 message loop
- What happens when you close a c++ console application
- Read process memory of a process does not return everything
- How to run application which requires admin rights from one that doesn’t have them [closed]
- How do I get the window handle of the desktop?
- C++/Win32: How to wait for a pending delete to complete
- How to use WndProc as a class function [duplicate]
- How to enable visual styles without a manifest
- How large is a DWORD with 32- and 64-bit code?
- How to embed WebKit into my C/C++/Win32 application?
- How to use the Windows API in MinGW?
- Validate Authenticode signature on EXE – C++ without CAPICOM
- EnumDisplayDevices vs WMI Win32_DesktopMonitor, how to detect active monitors?
- How to exit a blocking recv() call? [duplicate]
- Breaking ReadFile() blocking – Named Pipe (Windows API)
- how to get process handle from process id?
- Handle CTRL+C on Win32
- “APIENTRY _tWinMain” and “WINAPI WinMain” difference
- returning std::string/std::list from dll
- C++ Win32 keyboard events
- Convert a C++ program to a Windows service?