Author: dchapyshev
Date: Thu Jan 22 10:25:31 2009
New Revision: 39021
URL:
http://svn.reactos.org/svn/reactos?rev=39021&view=rev
Log:
- Implement SHFlushClipboard (based on msdn info)
- Implement DoEnvironmentSubstW (based on DoEnvironmentSubstA)
- Add checking of params for SHQueryRecycleBinW
Modified:
trunk/reactos/dll/win32/shell32/shellord.c
Modified: trunk/reactos/dll/win32/shell32/shellord.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/shell32/shellord…
==============================================================================
--- trunk/reactos/dll/win32/shell32/shellord.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/shell32/shellord.c [iso-8859-1] Thu Jan 22 10:25:31 2009
@@ -1414,7 +1414,7 @@
*
*/
HRESULT WINAPI DriveType(int DriveType)
-{
+{
WCHAR root[] = L"A:\\";
root[0] = L'A' + DriveType;
return GetDriveTypeW(root);
@@ -1452,8 +1452,8 @@
*
*/
HRESULT WINAPI SHFlushClipboard(void)
-{ FIXME("stub\n");
- return 1;
+{
+ return OleFlushClipboard();
}
/*************************************************************************
@@ -1547,8 +1547,21 @@
*/
DWORD WINAPI DoEnvironmentSubstW(LPWSTR pszString, UINT cchString)
{
- FIXME("(%s, %d): stub\n", debugstr_w(pszString), cchString);
- return MAKELONG(FALSE,cchString);
+ LPWSTR dst;
+ BOOL res = FALSE;
+ FIXME("(%s, %d): stub\n", debugstr_w(pszString), cchString);
+ if ((dst = HeapAlloc(GetProcessHeap(), 0, cchString * sizeof(WCHAR))))
+ {
+ DWORD num = ExpandEnvironmentStringsW(pszString, dst, cchString);
+ if (num)
+ {
+ res = TRUE;
+ wcscpy(pszString, dst);
+ }
+ HeapFree(GetProcessHeap(), 0, dst);
+ }
+
+ return MAKELONG(res,cchString);
}
/************************************************************************
@@ -2109,6 +2122,12 @@
{
FIXME("%s, %p - stub\n", debugstr_w(pszRootPath), pSHQueryRBInfo);
+ if (!(pszRootPath) || (pszRootPath[0] == 0) ||
+ !(pSHQueryRBInfo) || (pSHQueryRBInfo->cbSize < sizeof(SHQUERYRBINFO)))
+ {
+ return E_INVALIDARG;
+ }
+
pSHQueryRBInfo->i64Size = 0;
pSHQueryRBInfo->i64NumItems = 0;