Commit 37fe75b9 authored by Juergen Schmied's avatar Juergen Schmied Committed by Alexandre Julliard

Implemented StrToOleStrN.

Fixed crash in ShellExecuteEx. Implemented SHRegOpenKeyA, SHRegQueryValueExA, StrToOleStr[A|W]. Stubs for DoEnvironmentSubst[A|W], PathProcessCommand[A|W].
parent 9c894d1f
...@@ -207,11 +207,29 @@ BOOL WINAPI OleStrToStrN (LPSTR lpMulti, INT nMulti, LPCWSTR lpWide, INT nWide) ...@@ -207,11 +207,29 @@ BOOL WINAPI OleStrToStrN (LPSTR lpMulti, INT nMulti, LPCWSTR lpWide, INT nWide)
/************************************************************************* /*************************************************************************
* StrToOleStrN [SHELL32.79] * 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); TRACE("%p %x %s %x\n", lpWide, nWide, lpStrA, nStr);
return MultiByteToWideChar (0, 0, lpMulti, nMulti, lpWide, nWide); 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) ...@@ -577,9 +595,10 @@ BOOL WINAPI ShellExecuteExA (LPSHELLEXECUTEINFOA sei)
STARTUPINFOA startupinfo; STARTUPINFOA startupinfo;
PROCESS_INFORMATION processinformation; 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->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); ZeroMemory(szApplicationName,MAX_PATH);
if (sei->lpFile) if (sei->lpFile)
...@@ -744,8 +763,8 @@ HRESULT WINAPI SHRegCloseKey (HKEY hkey) ...@@ -744,8 +763,8 @@ HRESULT WINAPI SHRegCloseKey (HKEY hkey)
* *
*/ */
HRESULT WINAPI SHRegOpenKeyA(HKEY hKey, LPSTR lpSubKey, LPHKEY phkResult) 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); return RegOpenKeyA(hKey, lpSubKey, phkResult);
} }
...@@ -761,11 +780,16 @@ HRESULT WINAPI SHRegOpenKeyW (HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey) ...@@ -761,11 +780,16 @@ HRESULT WINAPI SHRegOpenKeyW (HKEY hkey, LPCWSTR lpszSubKey, LPHKEY retkey)
* SHRegQueryValueExA [SHELL32.509] * SHRegQueryValueExA [SHELL32.509]
* *
*/ */
HRESULT WINAPI SHRegQueryValueExA(DWORD u, LPSTR v, DWORD w, DWORD x, HRESULT WINAPI SHRegQueryValueExA(
DWORD y, DWORD z) HKEY hkey,
{ FIXME("0x%04lx %s 0x%04lx 0x%04lx 0x%04lx 0x%04lx stub\n", LPSTR lpValueName,
u,debugstr_a(v),w,x,y,z); LPDWORD lpReserved,
return 0; 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] * SHRegQueryValueW [NT4.0:SHELL32.510]
...@@ -1097,6 +1121,10 @@ HRESULT WINAPI RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z) ...@@ -1097,6 +1121,10 @@ HRESULT WINAPI RunDLL_CallEntry16(DWORD v, DWORD w, DWORD x, DWORD y, DWORD z)
/************************************************************************ /************************************************************************
* shell32_654 [SHELL32.654] * 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) HRESULT WINAPI shell32_654 (DWORD x, DWORD y)
{ FIXME("0x%08lx 0x%08lx stub\n",x,y); { FIXME("0x%08lx 0x%08lx stub\n",x,y);
...@@ -1117,7 +1145,7 @@ DWORD WINAPI RLBuildListOfPaths () ...@@ -1117,7 +1145,7 @@ DWORD WINAPI RLBuildListOfPaths ()
* StrToOleStr [SHELL32.163] * StrToOleStr [SHELL32.163]
* *
*/ */
int WINAPI StrToOleStr (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString) int WINAPI StrToOleStrA (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)
{ {
TRACE("%p %p(%s)\n", TRACE("%p %p(%s)\n",
lpWideCharStr, lpMultiByteString, lpMultiByteString); lpWideCharStr, lpMultiByteString, lpMultiByteString);
...@@ -1125,11 +1153,53 @@ int WINAPI StrToOleStr (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString) ...@@ -1125,11 +1153,53 @@ int WINAPI StrToOleStr (LPWSTR lpWideCharStr, LPCSTR lpMultiByteString)
return MultiByteToWideChar(0, 0, lpMultiByteString, -1, lpWideCharStr, MAX_PATH); 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] * SHValidateUNC [SHELL32.173]
* *
*/ */
HRESULT WINAPI SHValidateUNC (DWORD x, DWORD y, DWORD z) 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; 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 ...@@ -58,7 +58,7 @@ init Shell32LibMain
50 stub PathStripToRoot@4 50 stub PathStripToRoot@4
51 stdcall PathResolve(str long long) PathResolve 51 stdcall PathResolve(str long long) PathResolve
52 stdcall PathGetArgs(str) PathGetArgsAW 52 stdcall PathGetArgs(str) PathGetArgsAW
53 stub DoEnvironmentSubstW@8 53 stdcall DoEnvironmentSubst (long long) DoEnvironmentSubstAW
54 stdcall DragAcceptFiles(long long) DragAcceptFiles 54 stdcall DragAcceptFiles(long long) DragAcceptFiles
55 stdcall PathQuoteSpaces (ptr) PathQuoteSpacesAW 55 stdcall PathQuoteSpaces (ptr) PathQuoteSpacesAW
56 stdcall PathUnquoteSpaces(str) PathUnquoteSpacesAW 56 stdcall PathUnquoteSpaces(str) PathUnquoteSpacesAW
...@@ -84,7 +84,7 @@ init Shell32LibMain ...@@ -84,7 +84,7 @@ init Shell32LibMain
76 stub DragQueryInfo 76 stub DragQueryInfo
77 stdcall SHMapPIDLToSystemImageListIndex(long long long) SHMapPIDLToSystemImageListIndex 77 stdcall SHMapPIDLToSystemImageListIndex(long long long) SHMapPIDLToSystemImageListIndex
78 stdcall OleStrToStrN(str long wstr long) OleStrToStrN 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 80 stdcall DragFinish(long) DragFinish
81 stdcall DragQueryFile(long long ptr long) DragQueryFileA 81 stdcall DragQueryFile(long long ptr long) DragQueryFileA
82 stdcall DragQueryFileA(long long ptr long) DragQueryFileA 82 stdcall DragQueryFileA(long long ptr long) DragQueryFileA
...@@ -168,7 +168,7 @@ init Shell32LibMain ...@@ -168,7 +168,7 @@ init Shell32LibMain
160 stub SHNetConnectionDialog 160 stub SHNetConnectionDialog
161 stdcall SHRunControlPanel (long long) SHRunControlPanel 161 stdcall SHRunControlPanel (long long) SHRunControlPanel
162 stdcall SHSimpleIDListFromPath (ptr) SHSimpleIDListFromPathAW 162 stdcall SHSimpleIDListFromPath (ptr) SHSimpleIDListFromPathAW
163 stdcall StrToOleStr (wstr str) StrToOleStr 163 stdcall StrToOleStr (wstr str) StrToOleStrAW
164 stub Win32DeleteFile 164 stub Win32DeleteFile
165 stdcall SHCreateDirectory(long long) SHCreateDirectory 165 stdcall SHCreateDirectory(long long) SHCreateDirectory
166 stub CallCPLEntry16 166 stub CallCPLEntry16
...@@ -364,10 +364,15 @@ init Shell32LibMain ...@@ -364,10 +364,15 @@ init Shell32LibMain
648 stub SHWaitOp_Operate@8 648 stub SHWaitOp_Operate@8
650 stub PathIsSameRoot@8 650 stub PathIsSameRoot@8
# nt40/win98
651 stdcall ReadCabinetState (long long) ReadCabinetState 651 stdcall ReadCabinetState (long long) ReadCabinetState
652 stdcall WriteCabinetState (long) WriteCabinetState 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 654 stdcall shell32_654 (long long) shell32_654
660 stdcall FileIconInit (long) FileIconInit 660 stdcall FileIconInit (long) FileIconInit
680 stdcall IsUserAdmin () IsUserAdmin 680 stdcall IsUserAdmin () IsUserAdmin
...@@ -377,14 +382,8 @@ init Shell32LibMain ...@@ -377,14 +382,8 @@ init Shell32LibMain
# later additions ... FIXME: incorrect ordinals # later additions ... FIXME: incorrect ordinals
# win 98 uses 2...330, 505..511, 520..526, 640..654, 660, 680, 700..707, 711 # 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 1220 stdcall DllGetVersion (ptr) SHELL32_DllGetVersion # win98:201
1223 stub DoEnvironmentSubstW 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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment