mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
fixed called to Unicode SHELL_FindExecutable()
svn path=/trunk/; revision=7721
This commit is contained in:
parent
5a76bbd8ac
commit
83da931554
1 changed files with 7 additions and 9 deletions
|
@ -634,7 +634,7 @@ static HRESULT Stream_WriteString( IStream* stm, LPCWSTR str )
|
||||||
return S_OK;
|
return S_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT Stream_WriteLocationInfo( IStream* stm, LPCSTR filename )
|
static HRESULT Stream_WriteLocationInfo( IStream* stm, LPCWSTR filename )
|
||||||
{
|
{
|
||||||
LOCATION_INFO loc;
|
LOCATION_INFO loc;
|
||||||
ULONG count;
|
ULONG count;
|
||||||
|
@ -659,9 +659,10 @@ static HRESULT WINAPI IPersistStream_fnSave(
|
||||||
IStream* stm,
|
IStream* stm,
|
||||||
BOOL fClearDirty)
|
BOOL fClearDirty)
|
||||||
{
|
{
|
||||||
|
static const WCHAR wOpen[] = {'o','p','e','n',0};
|
||||||
|
|
||||||
LINK_HEADER header;
|
LINK_HEADER header;
|
||||||
char buffer[MAX_PATH];
|
WCHAR exePath[MAX_PATH];
|
||||||
char exePath[MAX_PATH];
|
|
||||||
ULONG count;
|
ULONG count;
|
||||||
HRESULT r;
|
HRESULT r;
|
||||||
|
|
||||||
|
@ -671,11 +672,8 @@ static HRESULT WINAPI IPersistStream_fnSave(
|
||||||
|
|
||||||
*exePath = '\0';
|
*exePath = '\0';
|
||||||
|
|
||||||
if (This->sPath) {
|
if (This->sPath)
|
||||||
WideCharToMultiByte(CP_ACP, 0, This->sPath, -1, buffer, MAX_PATH, 0, 0);
|
SHELL_FindExecutable(NULL, This->sPath, wOpen, exePath, NULL, NULL, NULL);
|
||||||
|
|
||||||
SHELL_FindExecutable(NULL, buffer, "open", exePath, NULL, NULL, NULL);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* if there's no PIDL, generate one */
|
/* if there's no PIDL, generate one */
|
||||||
if( ! This->pPidl )
|
if( ! This->pPidl )
|
||||||
|
@ -683,7 +681,7 @@ static HRESULT WINAPI IPersistStream_fnSave(
|
||||||
if( !*exePath )
|
if( !*exePath )
|
||||||
return E_FAIL;
|
return E_FAIL;
|
||||||
|
|
||||||
This->pPidl = ILCreateFromPathA(exePath);
|
This->pPidl = ILCreateFromPathW(exePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
memset(&header, 0, sizeof(header));
|
memset(&header, 0, sizeof(header));
|
||||||
|
|
Loading…
Reference in a new issue