Implemented StrToOleStrN.
Fixed crash in ShellExecuteEx. Implemented SHRegOpenKeyA, SHRegQueryValueExA, StrToOleStr[A|W]. Stubs for DoEnvironmentSubst[A|W], PathProcessCommand[A|W].
This commit is contained in:
parent
9c894d1f33
commit
37fe75b993
|
@ -207,11 +207,29 @@ BOOL WINAPI OleStrToStrN (LPSTR lpMulti, INT nMulti, LPCWSTR lpWide, INT nWide)
|
|||
|
||||
/*************************************************************************
|
||||
* StrToOleStrN [SHELL32.79]
|
||||
* lpMulti, nMulti, nWide [IN]
|
||||
* lpWide [OUT]
|
||||
*/
|
||||
BOOL WINAPI StrToOleStrN (LPWSTR lpWide, INT nWide, LPCSTR lpMulti, INT nMulti)
|
||||
BOOL WINAPI StrToOleStrNA (LPWSTR lpWide, INT nWide, LPCSTR lpStrA, INT nStr)
|
||||
{
|
||||
TRACE("%s %x %s %x\n", debugstr_w(lpWide), nWide, lpMulti, nMulti);
|
||||
return MultiByteToWideChar (0, 0, lpMulti, nMulti, lpWide, nWide);
|
||||
TRACE("%p %x %s %x\n", lpWide, nWide, lpStrA, nStr);
|
||||
return MultiByteToWideChar (0, 0, lpStrA, nStr, lpWide, nWide);
|
||||
}
|
||||
BOOL WINAPI StrToOleStrNW (LPWSTR lpWide, INT nWide, LPCWSTR lpStrW, INT nStr)
|
||||
{
|
||||
TRACE("%p %x %s %x\n", lpWide, nWide, debugstr_w(lpStrW), nStr);
|
||||
|
||||
if (lstrcpynW (lpWide, lpStrW, nWide))
|
||||
{ return lstrlenW (lpWide);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL WINAPI StrToOleStrNAW (LPWSTR lpWide, INT nWide, LPCVOID lpStr, INT nStr)
|
||||
{
|
||||
if (VERSION_OsIsUnicode())
|
||||
return StrToOleStrNW (lpWide, nWide, lpStr, nStr);
|
||||
return StrToOleStrNA (lpWide, nWide, lpStr, nStr);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
|
@ -577,9 +595,10 @@ BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei)
|
|||
STARTUPINFOA startupinfo;
|
||||
PROCESS_INFORMATION processinformation;
|
||||
|
||||
WARN("mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s incomplete\n",
|
||||
WARN("mask=0x%08lx hwnd=0x%04x verb=%s file=%s parm=%s dir=%s show=0x%08x class=%s incomplete\n",
|
||||
sei->fMask, sei->hwnd, sei->lpVerb, sei->lpFile,
|
||||
sei->lpParameters, sei->lpDirectory, sei->nShow, sei->lpClass);
|
||||
sei->lpParameters, sei->lpDirectory, sei->nShow,
|
||||
(sei->fMask & SEE_MASK_CLASSNAME) ? sei->lpClass : "not used");
|
||||
|
||||
ZeroMemory(szApplicationName,MAX_PATH);
|
||||
if (sei->lpFile)
|
||||
|
@ -744,8 +763,8 @@ HRESULT WINAPI SHRegCloseKey (HKEY hkey)
|
|||
*
|
||||
*/
|
||||
HRESULT WINAPI SHRegOpenKeyA(HKEY hKey, LPSTR lpSubKey, LPHKEY phkResult)
|
||||
{ FIXME("(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey),
|
||||
phkResult);
|
||||
{
|
||||
TRACE("(0x%08x, %s, %p)\n", hKey, debugstr_a(lpSubKey), phkResult);
|
||||
return RegOpenKeyA(hKey, lpSubKey, phkResult);
|
||||
}
|
||||
|
||||
|
@ -761,11 +780,16 @@ HRESULT WINAPI SHRegOpenKeyW (HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey)
|
|||
* SHRegQueryValueExA [SHELL32.509]
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI SHRegQueryValueExA(DWORD u, LPSTR v, DWORD w, DWORD x,
|
||||
DWORD y, DWORD z)
|
||||
{ FIXME("0x%04lx %s 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n",
|
||||
u,debugstr_a(v),w,x,y,z);
|
||||
return 0;
|
||||
HRESULT WINAPI SHRegQueryValueExA(
|
||||
HKEY hkey,
|
||||
LPSTR lpValueName,
|
||||
LPDWORD lpReserved,
|
||||
LPDWORD lpType,
|
||||
LPBYTE lpData,
|
||||
LPDWORD lpcbData)
|
||||
{
|
||||
TRACE("0x%04x %s %p %p %p %p\n", hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
|
||||
return RegQueryValueExA (hkey, lpValueName, lpReserved, lpType, lpData, lpcbData);
|
||||
}
|
||||
/*************************************************************************
|
||||
* SHRegQueryValueW [NT4.0:SHELL32.510]
|
||||
|
@ -1097,6 +1121,10 @@ HRESULT WINAPI RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z)
|
|||
/************************************************************************
|
||||
* shell32_654 [SHELL32.654]
|
||||
*
|
||||
* NOTES: first parameter seems to be a pointer (same as passed to WriteCabinetState)
|
||||
* second one could be a size (0x0c). The size is the same as the structure saved to
|
||||
* HCU\Software\Microsoft\Windows\CurrentVersion\Explorer\CabinetState
|
||||
* I'm (js) guessing: this one is just ReadCabinetState ;-)
|
||||
*/
|
||||
HRESULT WINAPI shell32_654 (DWORD x, DWORD y)
|
||||
{ FIXME("0x%08lx 0x%08lx stub\n",x,y);
|
||||
|
@ -1117,7 +1145,7 @@ DWORD WINAPI RLBuildListOfPaths ()
|
|||
* StrToOleStr [SHELL32.163]
|
||||
*
|
||||
*/
|
||||
int WINAPI StrToOleStr (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)
|
||||
int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)
|
||||
{
|
||||
TRACE("%p %p(%s)\n",
|
||||
lpWideCharStr, lpMultiByteString, lpMultiByteString);
|
||||
|
@ -1125,11 +1153,53 @@ int WINAPI StrToOleStr (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)
|
|||
return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH);
|
||||
|
||||
}
|
||||
int WINAPI StrToOleStrW (LPWSTR lpWideCharStr, LPCWSTR lpWString)
|
||||
{
|
||||
TRACE("%p %p(%s)\n",
|
||||
lpWideCharStr, lpWString, debugstr_w(lpWString));
|
||||
|
||||
if (lstrcpyW (lpWideCharStr, lpWString ))
|
||||
{ return lstrlenW (lpWideCharStr);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
BOOL WINAPI StrToOleStrAW (LPWSTR lpWideCharStr, LPCVOID lpString)
|
||||
{
|
||||
if (VERSION_OsIsUnicode())
|
||||
return StrToOleStrW (lpWideCharStr, lpString);
|
||||
return StrToOleStrA (lpWideCharStr, lpString);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* SHValidateUNC [SHELL32.173]
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI SHValidateUNC (DWORD x, DWORD y, DWORD z)
|
||||
{ FIXME("0x%08lx 0x%08lx 0x%08lx stub\n",x,y,z);
|
||||
{
|
||||
FIXME("0x%08lx 0x%08lx 0x%08lx stub\n",x,y,z);
|
||||
return 0;
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
* DoEnvironmentSubstW [SHELL32.53]
|
||||
*
|
||||
*/
|
||||
HRESULT WINAPI DoEnvironmentSubstA(LPSTR x, LPSTR y)
|
||||
{
|
||||
FIXME("%p(%s) %p(%s) stub\n", x, x, y, y);
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT WINAPI DoEnvironmentSubstW(LPWSTR x, LPWSTR y)
|
||||
{
|
||||
FIXME("%p(%s) %p(%s) stub\n", x, debugstr_w(x), y, debugstr_w(y));
|
||||
return 0;
|
||||
}
|
||||
|
||||
HRESULT WINAPI DoEnvironmentSubstAW(LPVOID x, LPVOID y)
|
||||
{
|
||||
if (VERSION_OsIsUnicode())
|
||||
return DoEnvironmentSubstW(x, y);
|
||||
return DoEnvironmentSubstA(x, y);
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ init Shell32LibMain
|
|||
50 stub PathStripToRoot@4
|
||||
51 stdcall PathResolve(str long long) PathResolve
|
||||
52 stdcall PathGetArgs(str) PathGetArgsAW
|
||||
53 stub DoEnvironmentSubstW@8
|
||||
53 stdcall DoEnvironmentSubst (long long) DoEnvironmentSubstAW
|
||||
54 stdcall DragAcceptFiles(long long) DragAcceptFiles
|
||||
55 stdcall PathQuoteSpaces (ptr) PathQuoteSpacesAW
|
||||
56 stdcall PathUnquoteSpaces(str) PathUnquoteSpacesAW
|
||||
|
@ -84,7 +84,7 @@ init Shell32LibMain
|
|||
76 stub DragQueryInfo
|
||||
77 stdcall SHMapPIDLToSystemImageListIndex(long long long) SHMapPIDLToSystemImageListIndex
|
||||
78 stdcall OleStrToStrN(str long wstr long) OleStrToStrN
|
||||
79 stdcall StrToOleStrN(wstr long str long) StrToOleStrN
|
||||
79 stdcall StrToOleStrN(wstr long str long) StrToOleStrNAW
|
||||
80 stdcall DragFinish(long) DragFinish
|
||||
81 stdcall DragQueryFile(long long ptr long) DragQueryFileA
|
||||
82 stdcall DragQueryFileA(long long ptr long) DragQueryFileA
|
||||
|
@ -168,7 +168,7 @@ init Shell32LibMain
|
|||
160 stub SHNetConnectionDialog
|
||||
161 stdcall SHRunControlPanel (long long) SHRunControlPanel
|
||||
162 stdcall SHSimpleIDListFromPath (ptr) SHSimpleIDListFromPathAW
|
||||
163 stdcall StrToOleStr (wstr str) StrToOleStr
|
||||
163 stdcall StrToOleStr (wstr str) StrToOleStrAW
|
||||
164 stub Win32DeleteFile
|
||||
165 stdcall SHCreateDirectory(long long) SHCreateDirectory
|
||||
166 stub CallCPLEntry16
|
||||
|
@ -364,10 +364,15 @@ init Shell32LibMain
|
|||
648 stub SHWaitOp_Operate@8
|
||||
|
||||
650 stub PathIsSameRoot@8
|
||||
|
||||
# nt40/win98
|
||||
651 stdcall ReadCabinetState (long long) ReadCabinetState
|
||||
652 stdcall WriteCabinetState (long) WriteCabinetState
|
||||
653 stdcall PathProcessCommand (long long long long) PathProcessCommand
|
||||
653 stdcall PathProcessCommand (long long long long) PathProcessCommandAW
|
||||
|
||||
# win98
|
||||
654 stdcall shell32_654 (long long) shell32_654
|
||||
|
||||
660 stdcall FileIconInit (long) FileIconInit
|
||||
|
||||
680 stdcall IsUserAdmin () IsUserAdmin
|
||||
|
@ -377,14 +382,8 @@ init Shell32LibMain
|
|||
# later additions ... FIXME: incorrect ordinals
|
||||
# win 98 uses 2...330, 505..511, 520..526, 640..654, 660, 680, 700..707, 711
|
||||
|
||||
# win98:201
|
||||
1220 stdcall DllGetVersion (ptr) SHELL32_DllGetVersion
|
||||
|
||||
# win98:292
|
||||
1221 stdcall SHGetSpecialFolderPathA(long ptr long long) SHGetSpecialFolderPathA
|
||||
|
||||
# win98:293
|
||||
1222 stub DoEnvironmentSubstA
|
||||
|
||||
# win98:204
|
||||
1223 stub DoEnvironmentSubstW
|
||||
1220 stdcall DllGetVersion (ptr) SHELL32_DllGetVersion # win98:201
|
||||
1221 stdcall SHGetSpecialFolderPathA(long ptr long long) SHGetSpecialFolderPathA # win98:292
|
||||
1222 stdcall DoEnvironmentSubstA (str str) DoEnvironmentSubstA # win98:293
|
||||
1223 stdcall DoEnvironmentSubstW (wstr wstr) DoEnvironmentSubstW # win98:204
|
||||
|
|
Loading…
Reference in New Issue