- Implement SHFlushClipboard (based on msdn info)

- Implement DoEnvironmentSubstW (based on DoEnvironmentSubstA)
- Add checking of params for SHQueryRecycleBinW

svn path=/trunk/; revision=39021
This commit is contained in:
Dmitry Chapyshev 2009-01-22 16:25:31 +00:00
parent 64b55a2448
commit be5c23f647

View file

@ -1414,7 +1414,7 @@ HRESULT WINAPI SHLoadOLE(LPARAM lParam)
*
*/
HRESULT WINAPI DriveType(int DriveType)
{
{
WCHAR root[] = L"A:\\";
root[0] = L'A' + DriveType;
return GetDriveTypeW(root);
@ -1452,8 +1452,8 @@ int WINAPI SHOutOfMemoryMessageBox(
*
*/
HRESULT WINAPI SHFlushClipboard(void)
{ FIXME("stub\n");
return 1;
{
return OleFlushClipboard();
}
/*************************************************************************
@ -1547,8 +1547,21 @@ DWORD WINAPI DoEnvironmentSubstA(LPSTR pszString, UINT cchString)
*/
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 @@ HRESULT WINAPI SHQueryRecycleBinW(LPCWSTR pszRootPath, LPSHQUERYRBINFO pSHQueryR
{
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;