ReactOS 0.4.15-dev-5858-g16decc6
zippidl.hpp File Reference
#include <pshpack1.h>
#include <poppack.h>
Include dependency graph for zippidl.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ZipPidlEntry
 

Enumerations

enum  ZipPidlType { ZIP_PIDL_DIRECTORY , ZIP_PIDL_FILE }
 

Functions

LPITEMIDLIST _ILCreate (ZipPidlType Type, LPCSTR lpString, unz_file_info64 &info)
 
const ZipPidlEntry_ZipFromIL (LPCITEMIDLIST pidl)
 

Enumeration Type Documentation

◆ ZipPidlType

Enumerator
ZIP_PIDL_DIRECTORY 
ZIP_PIDL_FILE 

Definition at line 9 of file zippidl.hpp.

10{
13};
@ ZIP_PIDL_FILE
Definition: zippidl.hpp:12
@ ZIP_PIDL_DIRECTORY
Definition: zippidl.hpp:11

Function Documentation

◆ _ILCreate()

LPITEMIDLIST _ILCreate ( ZipPidlType  Type,
LPCSTR  lpString,
unz_file_info64 info 
)

Definition at line 10 of file zippidl.cpp.

11{
12 int cbData = sizeof(ZipPidlEntry) + strlen(lpString);
13 ZipPidlEntry* pidl = (ZipPidlEntry*)SHAlloc(cbData + sizeof(WORD));
14 if (!pidl)
15 return NULL;
16
17 ZeroMemory(pidl, cbData + sizeof(WORD));
18
19 pidl->cb = cbData;
20 pidl->MagicType = 'z';
21 pidl->ZipType = Type;
22
24 {
25 pidl->CompressedSize = info.compressed_size;
26 pidl->UncompressedSize = info.uncompressed_size;
27 pidl->DosDate = info.dosDate;
28 pidl->Password = info.flag & MINIZIP_PASSWORD_FLAG;
29 }
30
31 strcpy(pidl->Name, lpString);
32 *(WORD*)((char*)pidl + cbData) = 0;
33
34 return (LPITEMIDLIST)pidl;
35}
Type
Definition: Type.h:7
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
#define NULL
Definition: types.h:112
#define MINIZIP_PASSWORD_FLAG
Definition: precomp.h:43
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:304
unsigned short WORD
Definition: ntddk_ex.h:93
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
ULONG64 UncompressedSize
Definition: zippidl.hpp:23
ZipPidlType ZipType
Definition: zippidl.hpp:20
char Name[1]
Definition: zippidl.hpp:27
ULONG DosDate
Definition: zippidl.hpp:24
ULONG64 CompressedSize
Definition: zippidl.hpp:22
BYTE MagicType
Definition: zippidl.hpp:19
BYTE Password
Definition: zippidl.hpp:25
#define ZeroMemory
Definition: winbase.h:1670

◆ _ZipFromIL()

const ZipPidlEntry * _ZipFromIL ( LPCITEMIDLIST  pidl)

Definition at line 38 of file zippidl.cpp.

39{
40 const ZipPidlEntry* zipPidl = (const ZipPidlEntry*)pidl;
41 if (zipPidl->MagicType == 'z')
42 return zipPidl;
43 return NULL;
44}

Referenced by CZipFolder::BindToObject(), CZipFolder::CompareIDs(), CZipFolder::GetAttributesOf(), CZipFolder::GetDetailsOf(), CZipFolder::GetDisplayNameOf(), and CZipFolder::GetUIObjectOf().