ReactOS 0.4.16-dev-2208-g6350669
CZipCreator Class Reference

#include <CZipCreator.hpp>

Collaboration diagram for CZipCreator:

Public Member Functions

virtual ~CZipCreator ()
 
virtual void DoAddItem (PCWSTR pszFile)
 
void SetNotifyPidl (PCIDLIST_ABSOLUTE pidl)
 

Static Public Member Functions

static CZipCreatorDoCreate (PCWSTR pszExistingZip=NULL, PCWSTR pszTargetDir=NULL)
 
static BOOL runThread (CZipCreator *pCreator)
 

Public Attributes

struct CZipCreatorImplm_pimpl
 
CComHeapPtr< ITEMIDLISTm_pidlNotify
 

Protected Member Functions

 CZipCreator ()
 

Detailed Description

Definition at line 13 of file CZipCreator.hpp.

Constructor & Destructor Documentation

◆ ~CZipCreator()

CZipCreator::~CZipCreator ( )
virtual

Definition at line 186 of file CZipCreator.cpp.

187{
189 delete m_pimpl;
190}
LONG g_ModuleRefCnt
Definition: ACPPage.cpp:13
#define InterlockedDecrement
Definition: armddk.h:52
struct CZipCreatorImpl * m_pimpl
Definition: CZipCreator.hpp:16

◆ CZipCreator()

CZipCreator::CZipCreator ( )
protected

Definition at line 181 of file CZipCreator.cpp.

182{
184}
#define InterlockedIncrement
Definition: armddk.h:53

Referenced by DoCreate().

Member Function Documentation

◆ DoAddItem()

void CZipCreator::DoAddItem ( PCWSTR  pszFile)
virtual

Definition at line 226 of file CZipCreator.cpp.

227{
228 // canonicalize path
231
232 m_pimpl->m_items.Add(szPath);
233}
#define NULL
Definition: types.h:112
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106
LPCWSTR szPath
Definition: env.c:37
#define _countof(array)
Definition: sndvol32.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CSendToZip::Drop(), and CZipFolder::Drop().

◆ DoCreate()

CZipCreator * CZipCreator::DoCreate ( PCWSTR  pszExistingZip = NULL,
PCWSTR  pszTargetDir = NULL 
)
static

Definition at line 171 of file CZipCreator.cpp.

172{
173 CZipCreator* pCreator = new CZipCreator();
174 if (pszExistingZip)
175 pCreator->m_pimpl->m_ExistingZip = pszExistingZip;
176 if (pszTargetDir)
177 pCreator->m_pimpl->m_TargetDir = pszTargetDir;
178 return pCreator;
179}

Referenced by CSendToZip::Drop(), and CZipFolder::Drop().

◆ runThread()

BOOL CZipCreator::runThread ( CZipCreator pCreator)
static

Definition at line 204 of file CZipCreator.cpp.

205{
206 unsigned tid = 0;
207 HANDLE hThread = reinterpret_cast<HANDLE>(
208 _beginthreadex(NULL, 0, create_zip_function, pCreator, 0, &tid));
209
210 if (hThread)
211 {
213 return TRUE;
214 }
215
216 DPRINT1("hThread == NULL\n");
217
220 MessageBoxW(NULL, strText, strTitle, MB_ICONERROR);
221
222 delete pCreator;
223 return FALSE;
224}
static unsigned __stdcall create_zip_function(void *arg)
#define DPRINT1
Definition: precomp.h:8
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDS_ERRORTITLE
Definition: resource.h:47
#define IDS_CANTSTARTTHREAD
Definition: resource.h:48
#define CloseHandle
Definition: compat.h:739
_ACRTIMP uintptr_t __cdecl _beginthreadex(void *, unsigned int, _beginthreadex_start_routine_t, void *, unsigned int, unsigned int *)
Definition: thread.c:207
static TfClientId tid
HANDLE hThread
Definition: wizard.c:28
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_ICONERROR
Definition: winuser.h:798
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by CSendToZip::Drop(), and CZipFolder::Drop().

◆ SetNotifyPidl()

void CZipCreator::SetNotifyPidl ( PCIDLIST_ABSOLUTE  pidl)
inline

Definition at line 26 of file CZipCreator.hpp.

27 {
28 if (pidl)
29 m_pidlNotify.Attach(ILClone(pidl));
30 }
CComHeapPtr< ITEMIDLIST > m_pidlNotify
Definition: CZipCreator.hpp:17
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:238

Referenced by CZipFolder::Drop().

Member Data Documentation

◆ m_pidlNotify

CComHeapPtr<ITEMIDLIST> CZipCreator::m_pidlNotify

Definition at line 17 of file CZipCreator.hpp.

Referenced by create_zip_function(), and SetNotifyPidl().

◆ m_pimpl

struct CZipCreatorImpl* CZipCreator::m_pimpl

Definition at line 16 of file CZipCreator.hpp.

Referenced by create_zip_function(), DoAddItem(), DoCreate(), and ~CZipCreator().


The documentation for this class was generated from the following files: