Currently viewing: GipsySoft » Front Page» Articles

GetModulePath

Get the path to the module passed, similar to GetModuleFileName but it removes the filename component.

DWORD GetModulePath( HINSTANCE hInst, LPTSTR pszBuffer, DWORD dwSize );

Return value

Retunrs the string length of the module path.

Example

TCHAR szPathToEXE[ MAX_PATH ];
DWORD dwLength = GetModulePath( NULL, szPathToEXE, MAX_PATH );

 

Click to view the source code

See also none