Added SHFreeNameMappings implementation.

This commit is contained in:
Rolf Kalbermatter 2004-10-18 19:33:45 +00:00 committed by Alexandre Julliard
parent d17c162c4c
commit 29d4ec4f85
2 changed files with 30 additions and 1 deletions

View file

@ -382,7 +382,7 @@
@ stdcall SHFileOperationA(ptr)
@ stdcall SHFileOperationW(ptr)
@ stub SHFormatDrive
@ stub SHFreeNameMappings
@ stdcall SHFreeNameMappings(ptr)
@ stdcall SHGetDesktopFolder(ptr)
@ stdcall SHGetFileInfo(ptr long ptr long long)SHGetFileInfoAW
@ stdcall SHGetFileInfoA(ptr long ptr long long)

View file

@ -1293,6 +1293,35 @@ DWORD WINAPI SHFileOperationAW(LPVOID lpFileOp)
return SHFileOperationA(lpFileOp);
}
#define SHDSA_GetItemCount(hdsa) (*(int*)(hdsa))
/*************************************************************************
* SHFreeNameMappings [shell32.246]
*
* Free the mapping handle returned by SHFileoperation if FOF_WANTSMAPPINGHANDLE
* was specified.
*
* PARAMS
* hNameMapping [I] handle to the name mappings used during renaming of files
*
*/
void WINAPI SHFreeNameMappings(HANDLE hNameMapping)
{
if (hNameMapping)
{
int i = SHDSA_GetItemCount((HDSA)hNameMapping) - 1;
for (; i>= 0; i--)
{
LPSHNAMEMAPPINGW lp = DSA_GetItemPtr((HDSA)hNameMapping, i);
SHFree(lp->pszOldPath);
SHFree(lp->pszNewPath);
}
DSA_Destroy((HDSA)hNameMapping);
}
}
/*************************************************************************
* SheGetDirW [SHELL32.281]
*