Use GetModuleFileName to find out where your exe is running from.
WCHAR path[MAX_PATH];
GetModuleFileNameW(NULL, path, MAX_PATH);
Then strip the exe name from path.
More Related Contents:
- How to debug heap corruption errors?
- Qt5 Static Build yields Failed to load platform plugin “windows”
- MSVCP140.dll missing
- How to Detect the Number of Physical Processors / Cores on Windows, Mac and Linux
- Exporting a C++ class from a DLL
- What is the proper OpenGL initialisation on Intel HD 3000?
- C++ system() not working when there are spaces in two different parameters
- How to get memory usage under Windows in C++
- Sharing a global/static variable between a process and DLL
- Multithreaded Rendering on OpenGL
- How to deploy a Qt application on Windows?
- How can I hook Windows functions in C/C++?
- What is the difference between WM_QUIT, WM_CLOSE, and WM_DESTROY in a windows program?
- CMake linking against shared library on windows: error about not finding .lib file
- Can the “Application Error” dialog box be disabled?
- Windows C++ compiler with full C++11 support (should work with Qt) [closed]
- Using CreateWindowEx to Make a Message-Only Window
- How do I get the application data path in Windows using C++?
- Get current username in C++ on Windows
- Wrote to a file using std::wofstream. The file remained empty
- How to download a file with WinHTTP in C/C++?
- WinAPI Sleep() function call sleeps for longer than expected
- Get HWND on windows with Qt5 (from WId)
- How do I use the MinGW gdb debugger to debug a C++ program in Windows?
- Windows C/C++ Crypto API Examples and tips
- “APIENTRY _tWinMain” and “WINAPI WinMain” difference
- OpenSSL::SSL_library_init() memory leak
- How do I get at the exception information when using MiniDumpWriteDump out-of-process?
- generates same number in Linux, but not in Windows
- sizeof(long) in 64-bit Windows