ReactOS 0.4.16-dev-306-g647d351
CZipExtract Class Reference
Inheritance diagram for CZipExtract:
Collaboration diagram for CZipExtract:

Classes

class  CCompleteSettingsPage
 
class  CExtractSettingsPage
 

Public Member Functions

 CZipExtract (PCWSTR Filename)
 
 ~CZipExtract ()
 
void Close ()
 
STDMETHODIMP QueryInterface (REFIID riid, void **ppvObject)
 
 STDMETHODIMP_ (ULONG) AddRef(void)
 
 STDMETHODIMP_ (ULONG) Release(void)
 
 STDMETHODIMP_ (unzFile) getZip()
 
void runWizard ()
 
eZipExtractError ExtractSingle (HWND hDlg, PCWSTR FullPath, bool is_dir, unz_file_info64 *Info, CStringW Name, CStringA Password, bool *bOverwriteAll, const bool *bCancel, int *ErrorCode)
 
bool Extract (HWND hDlg, HWND hProgress, const bool *bCancel)
 
int ShowExtractError (HWND hDlg, PCWSTR path, int Error, eZipExtractError ErrorType)
 
virtual STDMETHODIMP_ (unzFile) getZip() PURE
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Static Public Member Functions

static INT CALLBACK s_PropSheetCallbackProc (HWND hwndDlg, UINT uMsg, LPARAM lParam)
 

Private Attributes

CStringW m_Filename
 
CStringW m_Directory
 
CStringA m_Password
 
bool m_DirectoryChanged
 
unzFile uf
 

Additional Inherited Members

- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 

Detailed Description

Definition at line 12 of file CZipExtract.cpp.

Constructor & Destructor Documentation

◆ CZipExtract()

CZipExtract::CZipExtract ( PCWSTR  Filename)
inline

Definition at line 21 of file CZipExtract.cpp.

22 :m_DirectoryChanged(false)
23 ,uf(NULL)
24 {
30 }
void ReleaseBuffer(_In_ int nNewLength=-1)
Definition: atlsimpstr.h:387
bool m_DirectoryChanged
Definition: CZipExtract.cpp:18
CStringW m_Filename
Definition: CZipExtract.cpp:15
CStringW m_Directory
Definition: CZipExtract.cpp:16
unzFile uf
Definition: CZipExtract.cpp:19
#define NULL
Definition: types.h:112
void WINAPI PathRemoveExtensionW(LPWSTR lpszPath)
Definition: path.c:823
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:940
uint16_t * PWSTR
Definition: typedefs.h:56

◆ ~CZipExtract()

CZipExtract::~CZipExtract ( )
inline

Definition at line 32 of file CZipExtract.cpp.

33 {
34 if (uf)
35 {
36 DPRINT1("WARNING: uf not closed!\n");
37 Close();
38 }
39 }
#define DPRINT1
Definition: precomp.h:8
void Close()
Definition: CZipExtract.cpp:41

Member Function Documentation

◆ Close()

void CZipExtract::Close ( )
inline

Definition at line 41 of file CZipExtract.cpp.

42 {
43 if (uf)
44 unzClose(uf);
45 uf = NULL;
46 }
int ZEXPORT unzClose(unzFile file)
Definition: unzip.c:813

Referenced by Extract(), and ~CZipExtract().

◆ Extract()

bool CZipExtract::Extract ( HWND  hDlg,
HWND  hProgress,
const bool bCancel 
)
inline

Definition at line 556 of file CZipExtract.cpp.

557 {
560 int err = unzGetGlobalInfo64(uf, &gi);
561 if (err != UNZ_OK)
562 {
563 DPRINT1("ERROR, unzGetGlobalInfo64: 0x%x\n", err);
564 Close();
565 return false;
566 }
567
568 CZipEnumerator zipEnum;
569 if (!zipEnum.initialize(this))
570 {
571 DPRINT1("ERROR, zipEnum.initialize\n");
572 Close();
573 return false;
574 }
575
576 CWindow Progress(hProgress);
577 Progress.SendMessage(PBM_SETRANGE32, 0, gi.number_entry);
578 Progress.SendMessage(PBM_SETPOS, 0, 0);
579
580 CStringW BaseDirectory = m_Directory;
584 int CurrentFile = 0;
585 bool bOverwriteAll = false;
586 while (zipEnum.next(Name, Info))
587 {
588 if (*bCancel)
589 {
590 Close();
591 return false;
592 }
593
594 bool is_dir = Name.GetLength() > 0 && Name[Name.GetLength()-1] == '/';
595
596 // Build a combined path
597 CPathW FullPath(BaseDirectory);
598 FullPath += Name;
599
600 // We use SHPathPrepareForWrite for this path.
601 // SHPathPrepareForWrite will prepare the necessary directories.
602 // Windows and ReactOS SHPathPrepareForWrite do not support '/'.
603 FullPath.m_strPath.Replace(L'/', L'\\');
604
605 Retry:
606 eZipExtractError Result = ExtractSingle(hDlg, FullPath, is_dir, &Info, Name, Password, &bOverwriteAll, bCancel, &err);
607 if (Result != eDirectoryError)
608 CurrentFile++;
609 switch (Result)
610 {
611 case eNoError:
612 break;
613
614 case eExtractAbort:
615 case eUnpackError:
616 {
617 Close();
618 return false;
619 }
620
621 case eDirectoryError:
622 {
623 WCHAR StrippedPath[MAX_PATH] = { 0 };
624
625 StrCpyNW(StrippedPath, FullPath, _countof(StrippedPath));
626 if (!is_dir)
627 PathRemoveFileSpecW(StrippedPath);
628 PathStripPathW(StrippedPath);
629 if (ShowExtractError(hDlg, StrippedPath, err, eDirectoryError) == IDRETRY)
630 goto Retry;
631 Close();
632 return false;
633 }
634
635 case eFileError:
636 {
637 int Result = ShowExtractError(hDlg, FullPath, err, eFileError);
638 switch (Result)
639 {
640 case IDABORT:
641 Close();
642 return false;
643 case IDRETRY:
644 CurrentFile--;
645 goto Retry;
646 case IDIGNORE:
647 break;
648 }
649 break;
650 }
651
652 case eOpenError:
653 {
654 if (err == UNZ_BADZIPFILE &&
655 Info.compression_method != 0 &&
656 Info.compression_method != Z_DEFLATED &&
657 Info.compression_method != Z_BZIP2ED)
658 {
659 if (ShowExtractError(hDlg, FullPath, Info.compression_method, eOpenError) == IDYES)
660 break;
661 }
662 Close();
663 return false;
664 }
665 }
666 if (Result == eNoError && is_dir)
667 continue;
668 Progress.SendMessage(PBM_SETPOS, CurrentFile, 0);
669 }
670
671 Close();
672 return true;
673 }
struct NameRec_ * Name
Definition: cdprocs.h:460
PXSTR GetString() noexcept
Definition: atlsimpstr.h:367
int ShowExtractError(HWND hDlg, PCWSTR path, int Error, eZipExtractError ErrorType)
eZipExtractError ExtractSingle(HWND hDlg, PCWSTR FullPath, bool is_dir, unz_file_info64 *Info, CStringW Name, CStringA Password, bool *bOverwriteAll, const bool *bCancel, int *ErrorCode)
CStringA m_Password
Definition: CZipExtract.cpp:17
_In_ PSCSI_REQUEST_BLOCK _Out_ NTSTATUS _Inout_ BOOLEAN * Retry
Definition: classpnp.h:312
zlib_filefunc64_def g_FFunc
Definition: zipfldr.cpp:44
eZipExtractError
Definition: precomp.h:80
@ eUnpackError
Definition: precomp.h:86
@ eNoError
Definition: precomp.h:81
@ eExtractAbort
Definition: precomp.h:82
@ eOpenError
Definition: precomp.h:85
@ eFileError
Definition: precomp.h:84
@ eDirectoryError
Definition: precomp.h:83
#define MAX_PATH
Definition: compat.h:34
#define Z_DEFLATED
Definition: zlib.h:146
void WINAPI PathStripPathW(LPWSTR lpszPath)
Definition: path.c:694
BOOL WINAPI PathRemoveFileSpecW(LPWSTR lpszPath)
Definition: path.c:629
LPWSTR WINAPI StrCpyNW(LPWSTR dst, LPCWSTR src, int count)
Definition: string.c:536
#define L(x)
Definition: ntvdm.h:50
#define PBM_SETRANGE32
Definition: commctrl.h:2193
#define PBM_SETPOS
Definition: commctrl.h:2189
#define err(...)
#define _countof(array)
Definition: sndvol32.h:70
bool next(CStringW &name, unz_file_info64 &info)
bool initialize(IZip *zip)
ZPOS64_T number_entry
Definition: unzip.h:98
@ Password
Definition: telnetd.h:65
unzFile ZEXPORT unzOpen2_64(const void *path, zlib_filefunc64_def *pzlib_filefunc_def)
Definition: unzip.c:783
int ZEXPORT unzGetGlobalInfo64(unzFile file, unz_global_info64 *pglobal_info)
Definition: unzip.c:833
#define UNZ_BADZIPFILE
Definition: unzip.h:79
#define UNZ_OK
Definition: unzip.h:74
#define Z_BZIP2ED
Definition: unzip.h:62
_Must_inspect_result_ _In_ WDFCHILDLIST _In_ PWDF_CHILD_LIST_ITERATOR _Out_ WDFDEVICE _Inout_opt_ PWDF_CHILD_RETRIEVE_INFO Info
Definition: wdfchildlist.h:690
#define IDIGNORE
Definition: winuser.h:837
#define IDABORT
Definition: winuser.h:835
#define IDYES
Definition: winuser.h:838
#define IDRETRY
Definition: winuser.h:836
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:409
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by CZipExtract::CExtractSettingsPage::ExtractEntry().

◆ ExtractSingle()

eZipExtractError CZipExtract::ExtractSingle ( HWND  hDlg,
PCWSTR  FullPath,
bool  is_dir,
unz_file_info64 Info,
CStringW  Name,
CStringA  Password,
bool bOverwriteAll,
const bool bCancel,
int ErrorCode 
)
inline

Definition at line 373 of file CZipExtract.cpp.

384 {
385 int err;
386 BYTE Buffer[2048];
388 HRESULT hr = SHPathPrepareForWriteW(hDlg, NULL, FullPath, dwFlags);
390 {
391 *ErrorCode = hr;
392 return eDirectoryError;
393 }
394 if (is_dir)
395 return eNoError;
396
397 if (Info->flag & MINIZIP_PASSWORD_FLAG)
398 {
400 do
401 {
402 /* If there is a password set, try it */
403 if (!Password.IsEmpty())
404 {
406 if (err == UNZ_OK)
407 {
408 /* Try to read some bytes, because unzOpenCurrentFilePassword does not return failure */
409 char Buf[10];
410 err = unzReadCurrentFile(uf, Buf, sizeof(Buf));
412 if (err >= UNZ_OK)
413 {
414 /* 're'-open the file so that we can begin to extract */
416 break;
417 }
418 }
419 }
421 } while (Response == eAccept);
422
423 if (Response == eSkip)
424 {
425 return eNoError;
426 }
427 else if (Response == eAbort)
428 {
429 return eExtractAbort;
430 }
431 }
432 else
433 {
435 }
436
437 if (err != UNZ_OK)
438 {
439 DPRINT1("ERROR, unzOpenCurrentFilePassword: 0x%x\n", err);
440 *ErrorCode = err;
441 return eOpenError;
442 }
443
446 {
449 {
450 bool bOverwrite = *bOverwriteAll;
451 if (!*bOverwriteAll)
452 {
454 switch (Result)
455 {
456 case eYesToAll:
457 *bOverwriteAll = true;
458 /* fall through */
459 case eYes:
460 bOverwrite = true;
461 break;
462 case eNo:
463 break;
464 case eCancel:
466 return eExtractAbort;
467 }
468 }
469
470 if (bOverwrite)
471 {
474 {
476 }
477 }
478 else
479 {
481 return eNoError;
482 }
483 }
485 {
487 DPRINT1("ERROR, CreateFile: 0x%x (%s)\n", dwErr, *bOverwriteAll ? "Y" : "N");
488 *ErrorCode = dwErr;
489 return eFileError;
490 }
491 }
492
493 do
494 {
495 if (*bCancel)
496 {
498 BOOL deleteResult = DeleteFileW(FullPath);
499 if (!deleteResult)
500 DPRINT1("ERROR, DeleteFile: 0x%x\n", GetLastError());
501 return eExtractAbort;
502 }
503
505
506 if (err < 0)
507 {
508 DPRINT1("ERROR, unzReadCurrentFile: 0x%x\n", err);
509 break;
510 }
511 else if (err > 0)
512 {
513 DWORD dwWritten;
514 if (!WriteFile(hFile, Buffer, err, &dwWritten, NULL))
515 {
516 DPRINT1("ERROR, WriteFile: 0x%x\n", GetLastError());
517 break;
518 }
519 if (dwWritten != (DWORD)err)
520 {
521 DPRINT1("ERROR, WriteFile: dwWritten:%d err:%d\n", dwWritten, err);
522 break;
523 }
524 }
525
526 } while (err > 0);
527
528 /* Update Filetime */
529 FILETIME LocalFileTime;
530 DosDateTimeToFileTime((WORD)(Info->dosDate >> 16), (WORD)Info->dosDate, &LocalFileTime);
531 FILETIME FileTime;
532 LocalFileTimeToFileTime(&LocalFileTime, &FileTime);
533 SetFileTime(hFile, &FileTime, &FileTime, &FileTime);
534
535 /* Done */
537
538 if (err)
539 {
541 DPRINT1("ERROR, unzReadCurrentFile2: 0x%x\n", err);
542 *ErrorCode = err;
543 return eUnpackError;
544 }
545 else
546 {
548 if (err != UNZ_OK)
549 {
550 DPRINT1("ERROR(non-fatal), unzCloseCurrentFile: 0x%x\n", err);
551 }
552 }
553 return eNoError;
554 }
eZipConfirmResponse _CZipAskReplace(HWND hDlg, PCWSTR FullPath)
eZipPasswordResponse _CZipAskPassword(HWND hDlg, PCWSTR filename, CStringA &Password)
DWORD dwErr
Definition: service.c:36
Definition: bufpool.h:45
#define MINIZIP_PASSWORD_FLAG
Definition: precomp.h:42
eZipPasswordResponse
Definition: precomp.h:61
@ eAccept
Definition: precomp.h:64
@ eSkip
Definition: precomp.h:63
@ eAbort
Definition: precomp.h:62
eZipConfirmResponse
Definition: precomp.h:70
@ eCancel
Definition: precomp.h:74
@ eNo
Definition: precomp.h:73
@ eYes
Definition: precomp.h:71
@ eYesToAll
Definition: precomp.h:72
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define CreateFileW
Definition: compat.h:741
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI SetFileTime(IN HANDLE hFile, CONST FILETIME *lpCreationTime OPTIONAL, CONST FILETIME *lpLastAccessTime OPTIONAL, CONST FILETIME *lpLastWriteTime OPTIONAL)
Definition: fileinfo.c:948
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
Definition: rw.c:24
BOOL WINAPI DosDateTimeToFileTime(IN WORD wFatDate, IN WORD wFatTime, OUT LPFILETIME lpFileTime)
Definition: time.c:75
BOOL WINAPI LocalFileTimeToFileTime(IN CONST FILETIME *lpLocalFileTime, OUT LPFILETIME lpFileTime)
Definition: time.c:253
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
unsigned short WORD
Definition: ntddk_ex.h:93
#define CREATE_ALWAYS
Definition: disk.h:72
#define CREATE_NEW
Definition: disk.h:69
_In_ HANDLE hFile
Definition: mswsock.h:90
_In_ NDIS_ERROR_CODE ErrorCode
Definition: ndis.h:4436
#define GENERIC_WRITE
Definition: nt_native.h:90
EXTERN_C HRESULT WINAPI SHPathPrepareForWriteW(HWND hwnd, IUnknown *modless, LPCWSTR path, DWORD flags)
Definition: shlfileop.cpp:2237
HRESULT hr
Definition: shlfolder.c:183
#define SHPPFW_IGNOREFILENAME
Definition: shlobj.h:341
#define SHPPFW_DIRCREATE
Definition: shlobj.h:338
#define SHPPFW_NONE
Definition: shlobj.h:337
Definition: ncftp.h:89
int ZEXPORT unzOpenCurrentFilePassword(unzFile file, const char *password)
Definition: unzip.c:1653
int ZEXPORT unzOpenCurrentFile(unzFile file)
Definition: unzip.c:1648
int ZEXPORT unzReadCurrentFile(unzFile file, voidp buf, unsigned len)
Definition: unzip.c:1691
int ZEXPORT unzCloseCurrentFile(unzFile file)
Definition: unzip.c:2014
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1176
#define ERROR_FILE_EXISTS
Definition: winerror.h:165
unsigned char BYTE
Definition: xxhash.c:193

Referenced by Extract().

◆ QueryInterface()

STDMETHODIMP CZipExtract::QueryInterface ( REFIID  riid,
void **  ppvObject 
)
inline

Implements IUnknown.

Definition at line 49 of file CZipExtract.cpp.

50 {
51 if (riid == IID_IUnknown)
52 {
53 *ppvObject = this;
54 AddRef();
55 return S_OK;
56 }
57 return E_NOINTERFACE;
58 }
const GUID IID_IUnknown
REFIID riid
Definition: atlbase.h:39
ULONG AddRef()
#define S_OK
Definition: intsafe.h:52
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
#define E_NOINTERFACE
Definition: winerror.h:2364

◆ runWizard()

void CZipExtract::runWizard ( )
inline

Definition at line 349 of file CZipExtract.cpp.

350 {
351 PROPSHEETHEADERW psh = { sizeof(psh), 0 };
352 psh.dwFlags = PSH_WIZARD97 | PSH_HEADER | PSH_USEICONID | PSH_USECALLBACK;
353 psh.hInstance = _AtlBaseModule.GetResourceInstance();
354
355 CExtractSettingsPage extractPage(this, &m_Password);
356 CCompleteSettingsPage completePage(this);
357 HPROPSHEETPAGE hpsp[] =
358 {
359 extractPage.Create(),
360 completePage.Create()
361 };
362
363 psh.phpage = hpsp;
364 psh.nPages = _countof(hpsp);
366 psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
367 psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER);
369
370 PropertySheetW(&psh);
371 }
#define IDB_HEADER
Definition: resource.h:30
#define IDB_WATERMARK
Definition: resource.h:4
static INT CALLBACK s_PropSheetCallbackProc(HWND hwndDlg, UINT uMsg, LPARAM lParam)
#define IDI_ZIPFLDR
Definition: resource.h:4
INT_PTR WINAPI PropertySheetW(LPCPROPSHEETHEADERW lppsh)
Definition: propsheet.c:2916
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
#define PSH_USECALLBACK
Definition: prsht.h:48
#define PSH_USEICONID
Definition: prsht.h:42
HINSTANCE hInstance
Definition: prsht.h:296
DWORD dwFlags
Definition: prsht.h:294
LPCWSTR pszIcon
Definition: prsht.h:299
PFNPROPSHEETCALLBACK pfnCallback
Definition: prsht.h:311
HPROPSHEETPAGE * phpage
Definition: prsht.h:309
#define MAKEINTRESOURCE
Definition: winuser.h:591

Referenced by _CZipExtract_runWizard().

◆ s_PropSheetCallbackProc()

static INT CALLBACK CZipExtract::s_PropSheetCallbackProc ( HWND  hwndDlg,
UINT  uMsg,
LPARAM  lParam 
)
inlinestatic

Definition at line 337 of file CZipExtract.cpp.

338 {
339 if (uMsg == PSCB_INITIALIZED)
340 {
341 HICON hIcon = LoadIconW(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCEW(IDI_ZIPFLDR));
342 CWindow dlg(hwndDlg);
343 dlg.SetIcon(hIcon, TRUE);
344 }
345
346 return 0;
347 }
#define TRUE
Definition: types.h:120
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
#define PSCB_INITIALIZED
Definition: prsht.h:75
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
HICON WINAPI LoadIconW(_In_opt_ HINSTANCE hInstance, _In_ LPCWSTR lpIconName)
Definition: cursoricon.c:2127

Referenced by runWizard().

◆ ShowExtractError()

int CZipExtract::ShowExtractError ( HWND  hDlg,
PCWSTR  path,
int  Error,
eZipExtractError  ErrorType 
)
inline

Definition at line 675 of file CZipExtract.cpp.

676 {
678 CStringW strErr, strText;
679 PWSTR Win32ErrorString;
680
681 if (ErrorType == eFileError || ErrorType == eOpenError)
683 else
684 strText.LoadString(GetModuleHandleA("shell32.dll"), 128); // IDS_CREATEFOLDER_DENIED
685
686 strText.FormatMessage(strText.GetString(), path);
687
688 if (ErrorType == eFileError || HRESULT_FACILITY(Error) == FACILITY_WIN32)
689 {
691 NULL, ErrorType == eFileError ? Error : HRESULT_CODE(Error), 0,
692 (PWSTR)&Win32ErrorString, 0, NULL) != 0)
693 {
694 strErr.SetString(Win32ErrorString);
695 LocalFree(Win32ErrorString);
696 }
697 }
698 if (ErrorType == eOpenError)
700 else if (strErr.GetLength() == 0)
702
703 strText.Append(L"\r\n\r\n" + strErr);
704
705 UINT mbFlags = MB_ICONWARNING;
706 if (ErrorType == eDirectoryError)
707 mbFlags |= MB_RETRYCANCEL;
708 else if (ErrorType == eFileError)
709 mbFlags |= MB_ABORTRETRYIGNORE;
710 else if (ErrorType == eOpenError)
711 mbFlags |= MB_YESNO;
712
713 return MessageBoxW(hDlg, strText, strTitle, mbFlags);
714 }
BOOL Error
Definition: chkdsk.c:66
void Append(_In_count_(nLength) PCXSTR pszSrc, _In_ int nLength)
Definition: atlsimpstr.h:271
void SetString(_In_opt_z_ PCXSTR pszSrc)
Definition: atlsimpstr.h:309
int GetLength() const noexcept
Definition: atlsimpstr.h:362
BOOL LoadString(_In_ UINT nID)
Definition: cstringt.h:639
void __cdecl Format(UINT nFormatID,...)
Definition: cstringt.h:818
void __cdecl FormatMessage(UINT nFormatID,...)
Definition: cstringt.h:855
#define IDS_CANTEXTRACTFILE
Definition: resource.h:53
#define IDS_ERRORTITLE
Definition: resource.h:47
#define IDS_DECOMPRESSERROR
Definition: resource.h:54
#define IDS_UNKNOWNERROR
Definition: resource.h:55
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
Definition: loader.c:812
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
unsigned int UINT
Definition: ndis.h:50
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:449
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:445
#define HRESULT_FACILITY(hr)
Definition: winerror.h:79
#define FACILITY_WIN32
Definition: winerror.h:27
#define HRESULT_CODE(hr)
Definition: winerror.h:76
#define MB_RETRYCANCEL
Definition: winuser.h:808
#define MB_YESNO
Definition: winuser.h:820
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_ABORTRETRYIGNORE
Definition: winuser.h:794
#define MB_ICONWARNING
Definition: winuser.h:789

Referenced by Extract().

◆ STDMETHODIMP_() [1/3]

CZipExtract::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 59 of file CZipExtract.cpp.

60 {
61 return 2;
62 }

◆ STDMETHODIMP_() [2/3]

CZipExtract::STDMETHODIMP_ ( ULONG  )
inline

Definition at line 63 of file CZipExtract.cpp.

64 {
65 return 1;
66 }

◆ STDMETHODIMP_() [3/3]

CZipExtract::STDMETHODIMP_ ( unzFile  )
inlinevirtual

Reimplemented from IZip.

Definition at line 67 of file CZipExtract.cpp.

68 {
69 return uf;
70 }

Member Data Documentation

◆ m_Directory

◆ m_DirectoryChanged

◆ m_Filename

CStringW CZipExtract::m_Filename
private

Definition at line 15 of file CZipExtract.cpp.

Referenced by CZipExtract(), and Extract().

◆ m_Password

CStringA CZipExtract::m_Password
private

Definition at line 17 of file CZipExtract.cpp.

Referenced by Extract(), and runWizard().

◆ uf

unzFile CZipExtract::uf
private

Definition at line 19 of file CZipExtract.cpp.

Referenced by Close(), Extract(), ExtractSingle(), STDMETHODIMP_(), and ~CZipExtract().


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