Do not leave not initialized fields in the structure passed to
ShellExecuteExW32.
This commit is contained in:
parent
ccc57b323d
commit
9fd0183c27
|
@ -632,17 +632,10 @@ HINSTANCE16 WINAPI ShellExecute16( HWND16 hWnd, LPCSTR lpOperation,
|
|||
WCHAR *wVerb = NULL, *wFile = NULL, *wParameters = NULL, *wDirectory = NULL;
|
||||
HANDLE hProcess = 0;
|
||||
|
||||
if (lpOperation)
|
||||
seiW.lpVerb = __SHCloneStrAtoW(&wVerb, lpOperation);
|
||||
|
||||
if (lpFile)
|
||||
seiW.lpFile = __SHCloneStrAtoW(&wFile, lpFile);
|
||||
|
||||
if (lpParameters)
|
||||
seiW.lpParameters = __SHCloneStrAtoW(&wParameters, lpParameters);
|
||||
|
||||
if (lpDirectory)
|
||||
seiW.lpDirectory = __SHCloneStrAtoW(&wDirectory, lpDirectory);
|
||||
seiW.lpVerb = lpOperation ? __SHCloneStrAtoW(&wVerb, lpOperation) : NULL;
|
||||
seiW.lpFile = lpFile ? __SHCloneStrAtoW(&wFile, lpFile) : NULL;
|
||||
seiW.lpParameters = lpParameters ? __SHCloneStrAtoW(&wParameters, lpParameters) : NULL;
|
||||
seiW.lpDirectory = lpDirectory ? __SHCloneStrAtoW(&wDirectory, lpDirectory) : NULL;
|
||||
|
||||
seiW.cbSize = sizeof(seiW);
|
||||
seiW.fMask = 0;
|
||||
|
|
Loading…
Reference in New Issue