write: Use correct wordpad.exe path.
Wordpad.exe is in C:\Program Files\Windows NT\Accessories\ now. Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
56976159ab
commit
148d4048b4
|
@ -1,5 +1,5 @@
|
||||||
MODULE = write.exe
|
MODULE = write.exe
|
||||||
IMPORTS = user32 gdi32
|
IMPORTS = user32 gdi32 shell32
|
||||||
|
|
||||||
EXTRADLLFLAGS = -mwindows -mno-cygwin
|
EXTRADLLFLAGS = -mwindows -mno-cygwin
|
||||||
|
|
||||||
|
|
|
@ -23,6 +23,7 @@
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
#include <shlobj.h>
|
||||||
#include "resources.h"
|
#include "resources.h"
|
||||||
|
|
||||||
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdParagraph, int res)
|
int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdParagraph, int res)
|
||||||
|
@ -31,9 +32,9 @@ int CALLBACK WinMain(HINSTANCE hInstance, HINSTANCE hOldInstance, LPSTR szCmdPar
|
||||||
STARTUPINFOW stinf;
|
STARTUPINFOW stinf;
|
||||||
PROCESS_INFORMATION info;
|
PROCESS_INFORMATION info;
|
||||||
|
|
||||||
if (!GetSystemDirectoryW(path, MAX_PATH - 1 - lstrlenW(L"\\wordpad.exe")))
|
if (FAILED(SHGetFolderPathW(NULL, CSIDL_PROGRAM_FILES, NULL, 0, path)))
|
||||||
goto failed;
|
goto failed;
|
||||||
lstrcatW(path, L"\\wordpad.exe");
|
lstrcatW(path, L"\\Windows NT\\Accessories\\wordpad.exe");
|
||||||
|
|
||||||
stinf.cb = sizeof(STARTUPINFOW);
|
stinf.cb = sizeof(STARTUPINFOW);
|
||||||
GetStartupInfoW(&stinf);
|
GetStartupInfoW(&stinf);
|
||||||
|
|
Loading…
Reference in New Issue