This commit is contained in:
Igor Pavlov
2005-12-09 00:00:00 +00:00
committed by Kornel Lesiński
parent acac987575
commit e8d0636d7a
13 changed files with 138 additions and 94 deletions

View File

@@ -211,6 +211,10 @@ static HANDLE StartEditApplication(const UString &path, HWND window)
return 0;
}
#ifndef _UNICODE
typedef BOOL (WINAPI * ShellExecuteExWP)(LPSHELLEXECUTEINFOW lpExecInfo);
#endif
static HANDLE StartApplication(const UString &path, HWND window)
{
UINT32 result;
@@ -228,7 +232,11 @@ static HANDLE StartApplication(const UString &path, HWND window)
execInfo.lpDirectory = NULL;
execInfo.nShow = SW_SHOWNORMAL;
execInfo.hProcess = 0;
::ShellExecuteExW(&execInfo);
ShellExecuteExWP shellExecuteExW = (ShellExecuteExWP)
::GetProcAddress(::GetModuleHandleW(L"shell32.dll"), "ShellExecuteExW");
if (shellExecuteExW == 0)
return 0;
shellExecuteExW(&execInfo);
result = (UINT32)execInfo.hInstApp;
hProcess = execInfo.hProcess;
}