mirror of
https://github.com/reactos/reactos.git
synced 2026-06-05 11:12:56 +08:00
[ZIPFLDR] Rename _ILCreate as _ILCreateZipItem (#8752)
Tiny refactoring. The name of _ILCreate function is too ambiguous. JIRA issue: CORE-20466
This commit is contained in:
committed by
GitHub
parent
6e51f4abb0
commit
f488f34940
@@ -48,7 +48,7 @@ public:
|
||||
{
|
||||
if (mEnumerator.NextUnique(m_Prefix, name, dir, info))
|
||||
{
|
||||
item = _ILCreate(dir ? ZIP_PIDL_DIRECTORY : ZIP_PIDL_FILE, name, info);
|
||||
item = _ILCreateZipItem(dir ? ZIP_PIDL_DIRECTORY : ZIP_PIDL_FILE, name, info);
|
||||
if (!item)
|
||||
{
|
||||
hr = fetched ? S_FALSE : E_OUTOFMEMORY;
|
||||
|
||||
@@ -3,12 +3,12 @@
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: zip pidl handling
|
||||
* COPYRIGHT: Copyright 2017-2019 Mark Jansen (mark.jansen@reactos.org)
|
||||
* Copyright 2023 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||
* Copyright 2023-2026 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||
*/
|
||||
|
||||
#include "precomp.h"
|
||||
|
||||
LPITEMIDLIST _ILCreate(ZipPidlType Type, PCWSTR lpString, unz_file_info64& info)
|
||||
LPITEMIDLIST _ILCreateZipItem(ZipPidlType Type, PCWSTR lpString, unz_file_info64& info)
|
||||
{
|
||||
size_t cbData = sizeof(ZipPidlEntry) + wcslen(lpString) * sizeof(WCHAR);
|
||||
if (cbData > MAXWORD)
|
||||
@@ -33,7 +33,7 @@ LPITEMIDLIST _ILCreate(ZipPidlType Type, PCWSTR lpString, unz_file_info64& info)
|
||||
}
|
||||
|
||||
wcscpy(pidl->Name, lpString);
|
||||
*(WORD*)((char*)pidl + cbData) = 0; // The end of an ITEMIDLIST
|
||||
*(PWORD)((PBYTE)pidl + cbData) = 0; // The end of an ITEMIDLIST
|
||||
|
||||
return (LPITEMIDLIST)pidl;
|
||||
}
|
||||
|
||||
@@ -3,10 +3,9 @@
|
||||
* LICENSE: GPL-2.0+ (https://spdx.org/licenses/GPL-2.0+)
|
||||
* PURPOSE: zip pidl handling
|
||||
* COPYRIGHT: Copyright 2017 Mark Jansen (mark.jansen@reactos.org)
|
||||
* Copyright 2023 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||
* Copyright 2023-2026 Katayama Hirofumi MZ (katayama.hirofumi.mz@gmail.com)
|
||||
*/
|
||||
|
||||
|
||||
enum ZipPidlType
|
||||
{
|
||||
ZIP_PIDL_DIRECTORY,
|
||||
@@ -29,6 +28,5 @@ struct ZipPidlEntry
|
||||
};
|
||||
#include <poppack.h>
|
||||
|
||||
|
||||
LPITEMIDLIST _ILCreate(ZipPidlType Type, PCWSTR lpString, unz_file_info64& info);
|
||||
LPITEMIDLIST _ILCreateZipItem(ZipPidlType Type, PCWSTR lpString, unz_file_info64& info);
|
||||
const ZipPidlEntry* _ZipFromIL(LPCITEMIDLIST pidl);
|
||||
|
||||
Reference in New Issue
Block a user