[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:
Katayama Hirofumi MZ
2026-03-22 19:57:21 +09:00
committed by GitHub
parent 6e51f4abb0
commit f488f34940
3 changed files with 6 additions and 8 deletions

View File

@@ -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;

View File

@@ -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;
}

View File

@@ -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);