60{
62
64 {
67
69 {
71 {
73 {
74 LPWSTR szCabPathFileName, szFileName, szDestDir;
75 size_t cabPathNum, fileNameNum, destDirNum;
76
80
84
88
89#if 0
90 if (!ExtractFromCabinet(szCabPathFileName, szFileName, szDestDir))
91 {
93 }
94 else
95 {
97
98
99
100
102 }
103#else
105#endif
106
110
112 }
113
117
119 {
120 unsigned int nMaxFilesNum = 255;
121 size_t newSize = (nMaxFilesNum * (
MAX_PATH + 1)) + 1;
124
130
135
137 {
140 {
143
144 LPWSTR lpszTmp = lpszFiles;
146 size_t numOfChars = 0;
147
148
150
151 while (*lpszTmp)
152 {
154 numOfChars +=
wcslen(lpszTmp)+1 + 3;
155 lpszTmp +=
wcslen(lpszTmp)+1;
156 }
157
159
161 {
162 while (*lpszFiles)
163 {
164 wcscat(lpszFilePatterns,
L"\"");
165 wcscat(lpszFilePatterns, lpszFiles);
166 wcscat(lpszFilePatterns,
L"\"");
167
168 lpszFiles +=
wcslen(lpszFiles)+1;
169 if (*lpszFiles)
170 wcscat(lpszFilePatterns,
L" ");
171 }
172 }
173 else
174 {
175 wcscpy(lpszFilePatterns, lpszFiles);
176 }
177
180
183
185 }
186 }
187
189
190 break;
191 }
192
194 {
197
203
209
211 {
214 }
215
216 break;
217 }
218
220 {
223
227 bi.
lpszTitle =
L"Select the directory where the restored files should be stored:";
228
230
232 {
235 {
238 }
239
242 }
243
244 break;
245 }
246
247 default:
248
250 }
251 }
252 }
253
255}
#define IDC_BTN_BROWSE_CAB_FILES
#define IDC_BTN_BROWSE_ALL_FILES
#define IDC_TXT_FILE_TO_RESTORE
#define IDC_BTN_BROWSE_DIRS
BOOL MemFree(IN PVOID lpMem)
PVOID MemAlloc(IN DWORD dwFlags, IN SIZE_T dwBytes)
EXTERN_C LPITEMIDLIST WINAPI SHBrowseForFolderW(LPBROWSEINFOW lpbi)
#define OFN_FILEMUSTEXIST
#define OFN_PATHMUSTEXIST
#define OFN_ALLOWMULTISELECT
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define UNREFERENCED_PARAMETER(P)
@ COINIT_APARTMENTTHREADED
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define BIF_RETURNONLYFSDIRS
ITEMIDLIST UNALIGNED * LPITEMIDLIST
PCIDLIST_ABSOLUTE pidlRoot
#define Edit_SetSel(hwndCtl, ichStart, ichEnd)
#define Edit_SetText(hwndCtl, lpsz)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
HWND WINAPI SetFocus(_In_opt_ HWND)
int WINAPI GetWindowTextLengthW(_In_ HWND)
#define MB_ICONINFORMATION
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)