30 public CComCoClass<CZipFolder, &CLSID_ZipFolderStorageHandler>,
31 public CComObjectRootEx<CComMultiThreadModelNoCS>,
110 size_t cchRemaining = cchResult;
111 PWSTR pwszEnd = pwszResult;
117 cchRemaining -= cchWritten;
118 pwszEnd += cchWritten;
144 if (curpidl->mkid.cb != 0)
146 DPRINT1(
"ERROR, unhandled PIDL!\n");
173 return SHSetStrRet(&psd->
str,
L"");
182 return SHSetStrRet(&psd->
str,
L"");
187 return SHSetStrRet(&psd->
str,
L"");
198 return SHSetStrRet(&psd->
str,
L"");
228 if (
riid == IID_IShellFolder)
232 while (curpidl->mkid.cb)
239 newZipDir += zipEntry->
Name;
259 if (!zipEntry1 || !zipEntry2)
273 if (child1->mkid.cb && child2->mkid.cb)
275 else if (child1->mkid.cb)
277 else if (child2->mkid.cb)
285 static const GUID UnknownIID =
286 {0x93F81976, 0x6A0D, 0x42C3, {0x94, 0xDD, 0xAA, 0x25, 0x8A, 0x15, 0x54, 0x70}};
287 if (
riid == IID_IShellView)
290 CComPtr<IShellFolderViewCB> pcb;
301 else if (
riid == IID_IExplorerCommandProvider)
305 else if (
riid == IID_IContextMenu)
310 if (UnknownIID !=
riid)
316 if (!rgfInOut || !cidl || !apidl)
323 static DWORD dwFileAttrs = SFGAO_STREAM;
324 static DWORD dwFolderAttrs = SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_BROWSABLE;
327 while (cidl > 0 && *apidl)
334 *rgfInOut |= dwFileAttrs;
336 *rgfInOut |= dwFolderAttrs;
347 *rgfInOut &= ~SFGAO_VALIDATE;
381 return spContextMenu->InvokeCommand(&ici);
390 if ((
riid == IID_IExtractIconA ||
riid == IID_IExtractIconW) && cidl == 1)
399 else if (
riid == IID_IContextMenu && cidl >= 0)
431 if (curpidl->mkid.cb != 0)
433 DPRINT1(
"ERROR, unhandled PIDL!\n");
441 return SHSetStrRet(strRet, zipEntry->
Name);
516 UINT idCmd = idCmdFirst;
518 if (!(
uFlags & CMF_DEFAULTONLY))
535 FORMATETC etc = {
CF_HDROP,
NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL };
538 HRESULT hr = pDataObj->GetData(&etc, &stg);
553 CComHeapPtr<ITEMIDLIST> pidl;
562 DbgPrint(
"Failed to query the file.\r\n");
567 DbgPrint(
"Invalid number of files: %d\r\n", uNumFiles);
573 DbgPrint(
"Could not lock stg.hGlobal\r\n");
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
HRESULT _CEnumZipContents_CreateInstance(IZip *zip, DWORD flags, PCWSTR prefix, REFIID riid, LPVOID *ppvOut)
HRESULT _CExplorerCommandProvider_CreateInstance(IContextMenu *zipObject, REFIID riid, LPVOID *ppvOut)
HRESULT _CFolderViewCB_CreateInstance(REFIID riid, LPVOID *ppvOut)
static FolderViewColumns g_ColumnDefs[]
WCHAR * guid2string(REFCLSID iid)
int strcmp(const char *String1, const char *String2)
#define InterlockedIncrement
#define InterlockedDecrement
STDMETHODIMP EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList)
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO pici)
STDMETHODIMP GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay)
STDMETHODIMP GetClassID(CLSID *lpClassId)
STDMETHODIMP EnumSearches(IEnumExtraSearch **ppenum)
STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax)
STDMETHODIMP BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
STDMETHODIMP_(unzFile) getZip()
STDMETHODIMP GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags)
STDMETHODIMP SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut)
STDMETHODIMP ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, ULONG *pchEaten, PIDLIST_RELATIVE *ppidl, ULONG *pdwAttributes)
STDMETHODIMP GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv)
STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidlFolder, LPDATAOBJECT pDataObj, HKEY hkeyProgID)
STDMETHODIMP CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut)
static HRESULT CALLBACK ZipFolderMenuCallback(IShellFolder *psf, HWND hwnd, IDataObject *pdtobj, UINT uMsg, WPARAM wParam, LPARAM lParam)
STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
STDMETHODIMP BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut)
STDMETHODIMP GetDefaultSearchGUID(GUID *pguid)
static DWORD WINAPI s_ExtractProc(LPVOID arg)
CComHeapPtr< ITEMIDLIST > m_CurDir
STDMETHODIMP Initialize(PCWSTR zipFile, PCWSTR zipDir, PCUIDLIST_ABSOLUTE curDir, PCUIDLIST_RELATIVE pidl)
STDMETHODIMP GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet)
STDMETHODIMP GetCurFolder(PIDLIST_ABSOLUTE *pidl)
STDMETHODIMP CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2)
STDMETHODIMP MapColumnToSCID(UINT column, SHCOLUMNID *pscid)
STDMETHODIMP GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut)
STDMETHODIMP Initialize(PCIDLIST_ABSOLUTE pidl)
BOOL _GetFileTimeString(LPFILETIME lpFileTime, PWSTR pwszResult, UINT cchResult)
STDMETHODIMP GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut)
STDMETHODIMP GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd)
static LSTATUS(WINAPI *pRegDeleteTreeW)(HKEY
#define DFM_GETDEFSTATICID
#define DFM_MERGECONTEXTMENU
#define DFM_INVOKECOMMAND
zlib_filefunc64_def g_FFunc
#define IDS_COL_COMPRSIZE
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
#define FILE_ATTRIBUTE_NORMAL
#define FAILED_UNEXPECTEDLY(hr)
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI DosDateTimeToFileTime(IN WORD wFatDate, IN WORD wFatTime, OUT LPFILETIME lpFileTime)
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
UINT WINAPI DragQueryFileW(HDROP hDrop, UINT lFile, LPWSTR lpszwFile, UINT lLength)
LPWSTR WINAPI StrFormatByteSizeW(LONGLONG llBytes, LPWSTR lpszDest, UINT cchMax)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define MAKE_HRESULT(sev, fac, code)
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define COM_INTERFACE_ENTRY_IID(iid, x)
#define DECLARE_PROTECT_FINAL_CONSTRUCT()
#define DECLARE_NOT_AGGREGATABLE(x)
#define DECLARE_NO_REGISTRY()
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
unsigned __int3264 UINT_PTR
#define FILE_ATTRIBUTE_DIRECTORY
#define LOCALE_USER_DEFAULT
interface IBindCtx * LPBC
interface IDataObject * LPDATAOBJECT
const GUID IID_IDataObject
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
HRESULT WINAPI SHParseDisplayName(LPCWSTR pszName, IBindCtx *pbc, LPITEMIDLIST *ppidl, SFGAOF sfgaoIn, SFGAOF *psfgaoOut)
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
DWORD_PTR WINAPI SHGetFileInfoW(LPCWSTR path, DWORD dwFileAttributes, SHFILEINFOW *psfi, UINT sizeofpsfi, UINT flags)
#define SHGFI_USEFILEATTRIBUTES
HRESULT WINAPI CIDLData_CreateFromIDArray(PCIDLIST_ABSOLUTE pidlFolder, UINT cpidlFiles, PCUIDLIST_RELATIVE_ARRAY lppidlFiles, LPDATAOBJECT *ppdataObject)
#define MAKE_COMPARE_HRESULT(x)
struct _SFV_CREATE SFV_CREATE
const ITEMIDLIST_ABSOLUTE UNALIGNED * PCUIDLIST_ABSOLUTE
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCopyExW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc, STRSAFE_LPWSTR *ppszDestEnd, size_t *pcchRemaining, STRSAFE_DWORD dwFlags)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszSrc)
IShellFolderViewCB * psfvcb
unzFile ZEXPORT unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_filefunc_def)
int ZEXPORT unzClose(unzFile file)
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HKEY_CLASSES_ROOT
BOOL WINAPI InsertMenuW(_In_ HMENU, _In_ UINT, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define MAKEINTRESOURCEA(i)
#define MAKEINTRESOURCEW(i)
#define IID_PPV_ARG(Itype, ppType)
const ZipPidlEntry * _ZipFromIL(LPCITEMIDLIST pidl)