From f488f34940ad970a91f399c1a5b85fb10b003f77 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sun, 22 Mar 2026 19:57:21 +0900 Subject: [PATCH] [ZIPFLDR] Rename _ILCreate as _ILCreateZipItem (#8752) Tiny refactoring. The name of _ILCreate function is too ambiguous. JIRA issue: CORE-20466 --- dll/shellext/zipfldr/CEnumZipContents.cpp | 2 +- dll/shellext/zipfldr/zippidl.cpp | 6 +++--- dll/shellext/zipfldr/zippidl.hpp | 6 ++---- 3 files changed, 6 insertions(+), 8 deletions(-) diff --git a/dll/shellext/zipfldr/CEnumZipContents.cpp b/dll/shellext/zipfldr/CEnumZipContents.cpp index 4e212739672..2e9ecb8fa8d 100644 --- a/dll/shellext/zipfldr/CEnumZipContents.cpp +++ b/dll/shellext/zipfldr/CEnumZipContents.cpp @@ -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; diff --git a/dll/shellext/zipfldr/zippidl.cpp b/dll/shellext/zipfldr/zippidl.cpp index 3f3b2cbc862..986aa308210 100644 --- a/dll/shellext/zipfldr/zippidl.cpp +++ b/dll/shellext/zipfldr/zippidl.cpp @@ -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; } diff --git a/dll/shellext/zipfldr/zippidl.hpp b/dll/shellext/zipfldr/zippidl.hpp index dae339a7aea..f67f260a88b 100644 --- a/dll/shellext/zipfldr/zippidl.hpp +++ b/dll/shellext/zipfldr/zippidl.hpp @@ -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 - -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);