Commit 29d4ec4f authored by Rolf Kalbermatter's avatar Rolf Kalbermatter Committed by Alexandre Julliard

Added SHFreeNameMappings implementation.

parent d17c162c
......@@ -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)
......
......@@ -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]
*
......
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