ReactOS 0.4.17-dev-769-g1500a35
files.c File Reference
#include <stdarg.h>
#include <stdlib.h>
#include "windef.h"
#include "winbase.h"
#include "winuser.h"
#include "winreg.h"
#include "winnls.h"
#include "winver.h"
#include "winternl.h"
#include "setupapi.h"
#include "advpub.h"
#include "fdi.h"
#include "wine/debug.h"
#include "advpack_private.h"
Include dependency graph for files.c:

Go to the source code of this file.

Classes

struct  FILELIST
 
struct  SESSION
 
struct  tagLANGANDCODEPAGE
 

Macros

#define ROOT_LENGTH   3
 
#define EXTRACT_FILLFILELIST   0x00000001
 
#define EXTRACT_EXTRACTFILES   0x00000002
 

Typedefs

typedef struct tagLANGANDCODEPAGE LANGANDCODEPAGE
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (advpack)
 
static LPWSTR ansi_to_unicode_list (LPCSTR ansi_list)
 
HRESULT WINAPI AddDelBackupEntryA (LPCSTR lpcszFileList, LPCSTR lpcszBackupDir, LPCSTR lpcszBaseName, DWORD dwFlags)
 
HRESULT WINAPI AddDelBackupEntryW (LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir, LPCWSTR lpcszBaseName, DWORD dwFlags)
 
static UINT CALLBACK pQuietQueueCallback (PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
 
static UINT CALLBACK pQueueCallback (PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
 
HRESULT WINAPI AdvInstallFileA (HWND hwnd, LPCSTR lpszSourceDir, LPCSTR lpszSourceFile, LPCSTR lpszDestDir, LPCSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
 
HRESULT WINAPI AdvInstallFileW (HWND hwnd, LPCWSTR lpszSourceDir, LPCWSTR lpszSourceFile, LPCWSTR lpszDestDir, LPCWSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
 
static HRESULT DELNODE_recurse_dirtree (LPWSTR fname, DWORD flags)
 
HRESULT WINAPI DelNodeA (LPCSTR pszFileOrDirName, DWORD dwFlags)
 
HRESULT WINAPI DelNodeW (LPCWSTR pszFileOrDirName, DWORD dwFlags)
 
HRESULT WINAPI DelNodeRunDLL32A (HWND hWnd, HINSTANCE hInst, LPSTR cmdline, INT show)
 
HRESULT WINAPI DelNodeRunDLL32W (HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
 
static HRESULT (WINAPI *pExtract)(SESSION *
 
static LPSTR convert_file_list (LPCSTR FileList, DWORD *dwNumFiles)
 
static void free_file_node (struct FILELIST *pNode)
 
static BOOL file_in_list (LPCSTR szFile, LPCSTR szFileList)
 
static DWORD fill_file_list (SESSION *session, LPCSTR szCabName, LPCSTR szFileList)
 
static void free_file_list (SESSION *session)
 
HRESULT WINAPI ExtractFilesA (LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags, LPCSTR FileList, LPVOID LReserved, DWORD Reserved)
 
HRESULT WINAPI ExtractFilesW (LPCWSTR CabName, LPCWSTR ExpandDir, DWORD Flags, LPCWSTR FileList, LPVOID LReserved, DWORD Reserved)
 
HRESULT WINAPI FileSaveMarkNotExistA (LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName)
 
HRESULT WINAPI FileSaveMarkNotExistW (LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName)
 
HRESULT WINAPI FileSaveRestoreA (HWND hDlg, LPSTR pszFileList, LPSTR pszDir, LPSTR pszBaseName, DWORD dwFlags)
 
HRESULT WINAPI FileSaveRestoreW (HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName, DWORD dwFlags)
 
HRESULT WINAPI FileSaveRestoreOnINFA (HWND hWnd, LPCSTR pszTitle, LPCSTR pszINF, LPCSTR pszSection, LPCSTR pszBackupDir, LPCSTR pszBaseBackupFile, DWORD dwFlags)
 
HRESULT WINAPI FileSaveRestoreOnINFW (HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, LPCWSTR pszBackupDir, LPCWSTR pszBaseBackupFile, DWORD dwFlags)
 
HRESULT WINAPI GetVersionFromFileA (LPCSTR Filename, LPDWORD MajorVer, LPDWORD MinorVer, BOOL Version)
 
HRESULT WINAPI GetVersionFromFileW (LPCWSTR Filename, LPDWORD MajorVer, LPDWORD MinorVer, BOOL Version)
 
HRESULT WINAPI GetVersionFromFileExA (LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
 
HRESULT WINAPI GetVersionFromFileExW (LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
 

Variables

static LPCSTR
 

Macro Definition Documentation

◆ EXTRACT_EXTRACTFILES

#define EXTRACT_EXTRACTFILES   0x00000002

Definition at line 518 of file files.c.

◆ EXTRACT_FILLFILELIST

#define EXTRACT_FILLFILELIST   0x00000001

Definition at line 517 of file files.c.

◆ ROOT_LENGTH

#define ROOT_LENGTH   3

Definition at line 159 of file files.c.

Typedef Documentation

◆ LANGANDCODEPAGE

Function Documentation

◆ AddDelBackupEntryA()

HRESULT WINAPI AddDelBackupEntryA ( LPCSTR  lpcszFileList,
LPCSTR  lpcszBackupDir,
LPCSTR  lpcszBaseName,
DWORD  dwFlags 
)

Definition at line 59 of file files.c.

61{
62 UNICODE_STRING backupdir, basename;
63 LPWSTR filelist;
66
67 TRACE("(%s, %s, %s, %ld)\n", debugstr_a(lpcszFileList),
68 debugstr_a(lpcszBackupDir), debugstr_a(lpcszBaseName), dwFlags);
69
70 if (lpcszFileList)
71 filelist = ansi_to_unicode_list(lpcszFileList);
72 else
73 filelist = NULL;
74
75 RtlCreateUnicodeStringFromAsciiz(&backupdir, lpcszBackupDir);
77
78 if (lpcszBackupDir)
79 backup = backupdir.Buffer;
80 else
81 backup = NULL;
82
83 res = AddDelBackupEntryW(filelist, backup, basename.Buffer, dwFlags);
84
85 free(filelist);
86
87 RtlFreeUnicodeString(&backupdir);
89
90 return res;
91}
static long backup()
Definition: maze.c:403
#define free
Definition: debug_ros.c:5
#define NULL
Definition: types.h:112
static LPWSTR ansi_to_unicode_list(LPCSTR ansi_list)
Definition: files.c:40
HRESULT WINAPI AddDelBackupEntryW(LPCWSTR lpcszFileList, LPCWSTR lpcszBackupDir, LPCWSTR lpcszBaseName, DWORD dwFlags)
Definition: files.c:117
static void basename(LPCWSTR path, LPWSTR name)
Definition: profile.c:38
GLuint res
Definition: glext.h:9613
#define debugstr_a
Definition: kernel32.h:31
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
_In_ LPWSTR _In_ DWORD _In_ DWORD _In_ DWORD dwFlags
Definition: netsh.h:141
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
#define TRACE(s)
Definition: solgame.cpp:4
const uint16_t * LPCWSTR
Definition: typedefs.h:57
uint16_t * LPWSTR
Definition: typedefs.h:56

Referenced by FileSaveMarkNotExistA().

◆ AddDelBackupEntryW()

HRESULT WINAPI AddDelBackupEntryW ( LPCWSTR  lpcszFileList,
LPCWSTR  lpcszBackupDir,
LPCWSTR  lpcszBaseName,
DWORD  dwFlags 
)

Definition at line 117 of file files.c.

119{
120 WCHAR szIniPath[MAX_PATH];
121 LPCWSTR szString = NULL;
122
123 TRACE("(%s, %s, %s, %ld)\n", debugstr_w(lpcszFileList),
124 debugstr_w(lpcszBackupDir), debugstr_w(lpcszBaseName), dwFlags);
125
126 if (!lpcszFileList || !*lpcszFileList)
127 return S_OK;
128
129 if (lpcszBackupDir)
130 lstrcpyW(szIniPath, lpcszBackupDir);
131 else
132 GetWindowsDirectoryW(szIniPath, MAX_PATH);
133
134 lstrcatW(szIniPath, L"\\");
135 lstrcatW(szIniPath, lpcszBaseName);
136 lstrcatW(szIniPath, L".ini");
137
139
141 szString = L"-1,0,0,0,0,0,-1";
142 else if (dwFlags & AADBE_DEL_ENTRY)
143 szString = NULL;
144
145 /* add or delete the INI entries */
146 while (*lpcszFileList)
147 {
148 WritePrivateProfileStringW(L"backup", lpcszFileList, szString, szIniPath);
149 lpcszFileList += lstrlenW(lpcszFileList) + 1;
150 }
151
152 /* hide the INI file */
154
155 return S_OK;
156}
#define AADBE_DEL_ENTRY
Definition: advpub.h:116
#define AADBE_ADD_ENTRY
Definition: advpub.h:115
#define MAX_PATH
Definition: compat.h:34
#define FILE_ATTRIBUTE_NORMAL
Definition: compat.h:137
#define lstrcpyW
Definition: compat.h:749
#define lstrlenW
Definition: compat.h:750
BOOL WINAPI SetFileAttributesW(LPCWSTR lpFileName, DWORD dwFileAttributes)
Definition: fileinfo.c:779
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2271
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
#define L(x)
Definition: resources.c:13
#define S_OK
Definition: intsafe.h:52
#define debugstr_w
Definition: kernel32.h:32
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
short WCHAR
Definition: pedump.c:58

Referenced by AddDelBackupEntryA(), and FileSaveMarkNotExistW().

◆ AdvInstallFileA()

HRESULT WINAPI AdvInstallFileA ( HWND  hwnd,
LPCSTR  lpszSourceDir,
LPCSTR  lpszSourceFile,
LPCSTR  lpszDestDir,
LPCSTR  lpszDestFile,
DWORD  dwFlags,
DWORD  dwReserved 
)

Definition at line 188 of file files.c.

191{
192 UNICODE_STRING sourcedir, sourcefile;
193 UNICODE_STRING destdir, destfile;
194 HRESULT res;
195
196 TRACE("(%p, %s, %s, %s, %s, %ld, %ld)\n", hwnd, debugstr_a(lpszSourceDir),
197 debugstr_a(lpszSourceFile), debugstr_a(lpszDestDir),
198 debugstr_a(lpszDestFile), dwFlags, dwReserved);
199
200 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
201 return E_INVALIDARG;
202
203 RtlCreateUnicodeStringFromAsciiz(&sourcedir, lpszSourceDir);
204 RtlCreateUnicodeStringFromAsciiz(&sourcefile, lpszSourceFile);
205 RtlCreateUnicodeStringFromAsciiz(&destdir, lpszDestDir);
206 RtlCreateUnicodeStringFromAsciiz(&destfile, lpszDestFile);
207
208 res = AdvInstallFileW(hwnd, sourcedir.Buffer, sourcefile.Buffer,
209 destdir.Buffer, destfile.Buffer, dwFlags, dwReserved);
210
211 RtlFreeUnicodeString(&sourcedir);
212 RtlFreeUnicodeString(&sourcefile);
213 RtlFreeUnicodeString(&destdir);
214 RtlFreeUnicodeString(&destfile);
215
216 return res;
217}
#define E_INVALIDARG
Definition: ddrawi.h:101
HRESULT WINAPI AdvInstallFileW(HWND hwnd, LPCWSTR lpszSourceDir, LPCWSTR lpszSourceFile, LPCWSTR lpszDestDir, LPCWSTR lpszDestFile, DWORD dwFlags, DWORD dwReserved)
Definition: files.c:241
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

◆ AdvInstallFileW()

HRESULT WINAPI AdvInstallFileW ( HWND  hwnd,
LPCWSTR  lpszSourceDir,
LPCWSTR  lpszSourceFile,
LPCWSTR  lpszDestDir,
LPCWSTR  lpszDestFile,
DWORD  dwFlags,
DWORD  dwReserved 
)

Definition at line 241 of file files.c.

244{
245 PSP_FILE_CALLBACK_W pFileCallback;
246 LPWSTR szDestFilename;
248 WCHAR szRootPath[ROOT_LENGTH];
249 DWORD dwLastError;
250 HSPFILEQ fileQueue;
251 PVOID pContext;
252
253 TRACE("(%p, %s, %s, %s, %s, %ld, %ld)\n", hwnd, debugstr_w(lpszSourceDir),
254 debugstr_w(lpszSourceFile), debugstr_w(lpszDestDir),
255 debugstr_w(lpszDestFile), dwFlags, dwReserved);
256
257 if (!lpszSourceDir || !lpszSourceFile || !lpszDestDir)
258 return E_INVALIDARG;
259
260 fileQueue = SetupOpenFileQueue();
261 if (fileQueue == INVALID_HANDLE_VALUE)
263
264 pContext = NULL;
265 dwLastError = ERROR_SUCCESS;
266
267 lstrcpynW(szRootPath, lpszSourceDir, ROOT_LENGTH);
268 szPath = lpszSourceDir + ROOT_LENGTH;
269
270 /* use lpszSourceFile as destination filename if lpszDestFile is NULL */
271 szDestFilename = wcsdup(lpszDestFile ? lpszDestFile : lpszSourceFile);
272
273 /* add the file copy operation to the setup queue */
274 if (!SetupQueueCopyW(fileQueue, szRootPath, szPath, lpszSourceFile, NULL,
275 NULL, lpszDestDir, szDestFilename, dwFlags))
276 {
277 dwLastError = GetLastError();
278 goto done;
279 }
280
282 0, 0, NULL);
283 if (!pContext)
284 {
285 dwLastError = GetLastError();
286 goto done;
287 }
288
289 /* don't output anything for AIF_QUIET */
290 if (dwFlags & AIF_QUIET)
291 pFileCallback = pQuietQueueCallback;
292 else
293 pFileCallback = pQueueCallback;
294
295 /* perform the file copy */
296 if (!SetupCommitFileQueueW(hwnd, fileQueue, pFileCallback, pContext))
297 {
298 dwLastError = GetLastError();
299 goto done;
300 }
301
302done:
304 SetupCloseFileQueue(fileQueue);
305
306 free(szDestFilename);
307
308 return HRESULT_FROM_WIN32(dwLastError);
309}
#define AIF_QUIET
Definition: advpub.h:127
#define ERROR_SUCCESS
Definition: deptool.c:10
static UINT CALLBACK pQuietQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: files.c:161
static UINT CALLBACK pQueueCallback(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: files.c:167
#define ROOT_LENGTH
Definition: files.c:159
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define lstrcpynW
Definition: compat.h:738
static wchar_t * wcsdup(const wchar_t *str)
Definition: string.h:94
PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND owner, HWND progress, UINT msg, DWORD reserved1, PVOID reserved2)
Definition: queue.c:1638
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
Definition: queue.c:1656
BOOL WINAPI SetupQueueCopyW(HSPFILEQ queue, PCWSTR src_root, PCWSTR src_path, PCWSTR src_file, PCWSTR src_descr, PCWSTR src_tag, PCWSTR dst_dir, PCWSTR dst_file, DWORD style)
Definition: queue.c:574
UINT(CALLBACK * PSP_FILE_CALLBACK_W)(IN PVOID Context, IN UINT Notification, IN UINT_PTR Param1, IN UINT_PTR Param2)
Definition: fileqsup.h:66
unsigned long DWORD
Definition: ntddk_ex.h:95
LPCWSTR szPath
Definition: env.c:37
#define SetupOpenFileQueue
Definition: fileqsup.c:29
#define SetupCommitFileQueueW
Definition: fileqsup.c:33
#define SetupCloseFileQueue
Definition: fileqsup.c:30
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
static HRESULT HRESULT_FROM_WIN32(unsigned int x)
Definition: winerror.h:210

Referenced by AdvInstallFileA().

◆ ansi_to_unicode_list()

static LPWSTR ansi_to_unicode_list ( LPCSTR  ansi_list)
static

Definition at line 40 of file files.c.

41{
42 DWORD len, wlen = 0;
44 LPCSTR ptr = ansi_list;
45
46 while (*ptr) ptr += lstrlenA(ptr) + 1;
47 len = ptr + 1 - ansi_list;
48 wlen = MultiByteToWideChar(CP_ACP, 0, ansi_list, len, NULL, 0);
49 list = malloc(wlen * sizeof(WCHAR));
50 MultiByteToWideChar(CP_ACP, 0, ansi_list, len, list, wlen);
51 return list;
52}
Definition: list.h:37
#define malloc
Definition: debug_ros.c:4
#define CP_ACP
Definition: compat.h:109
#define MultiByteToWideChar
Definition: compat.h:110
GLenum GLsizei len
Definition: glext.h:6722
int WINAPI lstrlenA(LPCSTR lpString)
Definition: lstring.c:145
static PVOID ptr
Definition: dispmode.c:27
#define list
Definition: rosglue.h:35
const char * LPCSTR
Definition: typedefs.h:52

Referenced by AddDelBackupEntryA().

◆ convert_file_list()

static LPSTR convert_file_list ( LPCSTR  FileList,
DWORD dwNumFiles 
)
static

Definition at line 543 of file files.c.

544{
545 DWORD dwLen;
546 const char *first = FileList;
547 const char *last = FileList + strlen(FileList) - 1;
548 LPSTR szConvertedList, temp;
549
550 /* any number of these chars before the list is OK */
551 while (first < last && (*first == ' ' || *first == '\t' || *first == ':'))
552 first++;
553
554 /* any number of these chars after the list is OK */
555 while (last > first && (*last == ' ' || *last == '\t' || *last == ':'))
556 last--;
557
558 if (first == last)
559 return NULL;
560
561 dwLen = last - first + 3; /* room for double-null termination */
562 szConvertedList = malloc(dwLen);
563 lstrcpynA(szConvertedList, first, dwLen - 1);
564 szConvertedList[dwLen - 1] = '\0';
565
566 /* empty list */
567 if (!szConvertedList[0])
568 {
569 free(szConvertedList);
570 return NULL;
571 }
572
573 *dwNumFiles = 1;
574
575 /* convert the colons to double-null termination */
576 temp = szConvertedList;
577 while (*temp)
578 {
579 if (*temp == ':')
580 {
581 *temp = '\0';
582 (*dwNumFiles)++;
583 }
584
585 temp++;
586 }
587
588 return szConvertedList;
589}
vector< FileInfo > FileList
Definition: DriveVolume.h:63
#define lstrcpynA
Definition: compat.h:751
_ACRTIMP size_t __cdecl strlen(const char *)
Definition: string.c:1597
const GLint * first
Definition: glext.h:5794
static const LARGE_INTEGER *static const HANDLE const LARGE_INTEGER *static PSLIST_ENTRY PSLIST_ENTRY last
Definition: sync.c:64
static calc_node_t temp
Definition: rpn_ieee.c:38
char * LPSTR
Definition: typedefs.h:51

Referenced by ExtractFilesA().

◆ DELNODE_recurse_dirtree()

static HRESULT DELNODE_recurse_dirtree ( LPWSTR  fname,
DWORD  flags 
)
static

Definition at line 311 of file files.c.

312{
313 DWORD fattrs = GetFileAttributesW(fname);
315
316 if (fattrs & FILE_ATTRIBUTE_DIRECTORY)
317 {
318 HANDLE hFindFile;
319 WIN32_FIND_DATAW w32fd;
320 BOOL done = TRUE;
321 int fname_len = lstrlenW(fname);
322#ifdef __REACTOS__
324 goto deleteinitialdirectory;
325#endif
326
327 /* Generate a path with wildcard suitable for iterating */
328 if (fname_len && fname[fname_len-1] != '\\') fname[fname_len++] = '\\';
329 lstrcpyW(fname + fname_len, L"*");
330
331 if ((hFindFile = FindFirstFileW(fname, &w32fd)) != INVALID_HANDLE_VALUE)
332 {
333 /* Iterate through the files in the directory */
334 for (done = FALSE; !done; done = !FindNextFileW(hFindFile, &w32fd))
335 {
336 TRACE("%s\n", debugstr_w(w32fd.cFileName));
337 if (lstrcmpW(L".", w32fd.cFileName) != 0 && lstrcmpW(L"..", w32fd.cFileName) != 0)
338 {
339 lstrcpyW(fname + fname_len, w32fd.cFileName);
340 if (DELNODE_recurse_dirtree(fname, flags) != S_OK)
341 {
342 break; /* Failure */
343 }
344 }
345 }
346 FindClose(hFindFile);
347 }
348
349 /* We're done with this directory, so restore the old path without wildcard */
350 *(fname + fname_len) = '\0';
351
352 if (done)
353 {
354#ifdef __REACTOS__
355deleteinitialdirectory:
356#endif
357 TRACE("%s: directory\n", debugstr_w(fname));
358#ifdef __REACTOS__
360 if (RemoveDirectoryW(fname))
361#else
363#endif
364 {
365 ret = S_OK;
366 }
367 }
368 }
369 else
370 {
371 TRACE("%s: file\n", debugstr_w(fname));
372#ifdef __REACTOS__
374 if (DeleteFileW(fname))
375#else
377#endif
378 {
379 ret = S_OK;
380 }
381 }
382
383 return ret;
384}
#define ADN_DEL_IF_EMPTY
Definition: DelNode.c:13
#define E_FAIL
Definition: ddrawi.h:102
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
static HRESULT DELNODE_recurse_dirtree(LPWSTR fname, DWORD flags)
Definition: files.c:311
BOOL WINAPI DeleteFileW(IN LPCWSTR lpFileName)
Definition: delete.c:39
BOOL WINAPI RemoveDirectoryW(IN LPCWSTR lpPathName)
Definition: dir.c:700
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:636
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502
BOOL WINAPI FindNextFileW(IN HANDLE hFindFile, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:382
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
Definition: locale.c:4152
return ret
Definition: mutex.c:147
unsigned int BOOL
Definition: ntddk_ex.h:94
GLbitfield flags
Definition: glext.h:7161
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
_Field_z_ WCHAR cFileName[MAX_PATH]
Definition: minwinbase.h:291

Referenced by DELNODE_recurse_dirtree(), and DelNodeW().

◆ DelNodeA()

HRESULT WINAPI DelNodeA ( LPCSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 391 of file files.c.

392{
393 UNICODE_STRING fileordirname;
394 HRESULT res;
395
396 TRACE("(%s, %ld)\n", debugstr_a(pszFileOrDirName), dwFlags);
397
398 RtlCreateUnicodeStringFromAsciiz(&fileordirname, pszFileOrDirName);
399
400 res = DelNodeW(fileordirname.Buffer, dwFlags);
401
402 RtlFreeUnicodeString(&fileordirname);
403
404 return res;
405}
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
Definition: files.c:425

◆ DelNodeRunDLL32A()

HRESULT WINAPI DelNodeRunDLL32A ( HWND  hWnd,
HINSTANCE  hInst,
LPSTR  cmdline,
INT  show 
)

Definition at line 457 of file files.c.

458{
460 HRESULT hr;
461
462 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_a(cmdline), show);
463
465
466 hr = DelNodeRunDLL32W(hWnd, hInst, params.Buffer, show);
467
469
470 return hr;
471}
HWND hWnd
Definition: settings.c:17
HRESULT hr
Definition: delayimp.cpp:582
HRESULT WINAPI DelNodeRunDLL32W(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
Definition: files.c:488
HINSTANCE hInst
Definition: dxdiag.c:13
GLenum const GLfloat * params
Definition: glext.h:5645
TCHAR * cmdline
Definition: stretchblt.cpp:32

◆ DelNodeRunDLL32W()

HRESULT WINAPI DelNodeRunDLL32W ( HWND  hWnd,
HINSTANCE  hInst,
LPWSTR  cmdline,
INT  show 
)

Definition at line 488 of file files.c.

489{
490 LPWSTR szFilename, szFlags;
491 LPWSTR cmdline_copy, cmdline_ptr;
492 DWORD dwFlags = 0;
493 HRESULT res;
494
495 TRACE("(%p, %p, %s, %i)\n", hWnd, hInst, debugstr_w(cmdline), show);
496
497 cmdline_copy = wcsdup(cmdline);
498 cmdline_ptr = cmdline_copy;
499
500 /* get the parameters at indexes 0 and 1 respectively */
501 szFilename = get_parameter(&cmdline_ptr, ',', TRUE);
502 szFlags = get_parameter(&cmdline_ptr, ',', TRUE);
503
504 if (szFlags)
505 dwFlags = wcstol(szFlags, NULL, 10);
506
507 res = DelNodeW(szFilename, dwFlags);
508
509 free(cmdline_copy);
510
511 return res;
512}
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted)
Definition: install.c:178
_ACRTIMP __msvcrt_long __cdecl wcstol(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2752

Referenced by DelNodeRunDLL32A().

◆ DelNodeW()

HRESULT WINAPI DelNodeW ( LPCWSTR  pszFileOrDirName,
DWORD  dwFlags 
)

Definition at line 425 of file files.c.

426{
427 WCHAR fname[MAX_PATH];
429
430 TRACE("(%s, %ld)\n", debugstr_w(pszFileOrDirName), dwFlags);
431
432#ifdef __REACTOS__
434 FIXME("Flags %#x ignored!\n", dwFlags & ~ADN_DEL_IF_EMPTY);
435#else
436 if (dwFlags)
437 FIXME("Flags ignored!\n");
438#endif
439
440 if (pszFileOrDirName && *pszFileOrDirName)
441 {
442 lstrcpyW(fname, pszFileOrDirName);
443
444 /* TODO: Should check for system directory deletion etc. here */
445
447 }
448
449 return ret;
450}
#define FIXME(fmt,...)
Definition: precomp.h:53

Referenced by del_dirs_callback(), DelNodeA(), and DelNodeRunDLL32W().

◆ ExtractFilesA()

HRESULT WINAPI ExtractFilesA ( LPCSTR  CabName,
LPCSTR  ExpandDir,
DWORD  Flags,
LPCSTR  FileList,
LPVOID  LReserved,
DWORD  Reserved 
)

Definition at line 685 of file files.c.

687{
690 HRESULT res = S_OK;
691 DWORD dwFileCount = 0;
692 DWORD dwFilesFound = 0;
693 LPSTR szConvertedList = NULL;
694
695 TRACE("(%s, %s, %ld, %s, %p, %ld)\n", debugstr_a(CabName), debugstr_a(ExpandDir),
696 Flags, debugstr_a(FileList), LReserved, Reserved);
697
698 if (!CabName || !ExpandDir)
699 return E_INVALIDARG;
700
703
704 hCabinet = LoadLibraryA("cabinet.dll");
705 if (!hCabinet)
706 return E_FAIL;
707
708 ZeroMemory(&session, sizeof(SESSION));
709
710 pExtract = (void *)GetProcAddress(hCabinet, "Extract");
711 if (!pExtract)
712 {
713 res = E_FAIL;
714 goto done;
715 }
716
717 lstrcpyA(session.Destination, ExpandDir);
718
719 if (FileList)
720 {
721 szConvertedList = convert_file_list(FileList, &dwFileCount);
722 if (!szConvertedList)
723 {
724 res = E_FAIL;
725 goto done;
726 }
727
728 dwFilesFound = fill_file_list(&session, CabName, szConvertedList);
729 if (dwFilesFound != dwFileCount)
730 {
731 res = E_FAIL;
732 goto done;
733 }
734 }
735 else
736 session.Operation |= EXTRACT_FILLFILELIST;
737
738 session.Operation |= EXTRACT_EXTRACTFILES;
739 res = pExtract(&session, CabName);
740
741done:
744 free(szConvertedList);
745
746 return res;
747}
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID _In_ ULONG _In_ ULONG Flags
Definition: dispmprt.h:245
static LPSTR convert_file_list(LPCSTR FileList, DWORD *dwNumFiles)
Definition: files.c:543
#define EXTRACT_EXTRACTFILES
Definition: files.c:518
static void free_file_list(SESSION *session)
Definition: files.c:648
static DWORD fill_file_list(SESSION *session, LPCSTR szCabName, LPCSTR szFileList)
Definition: files.c:621
#define EXTRACT_FILLFILELIST
Definition: files.c:517
#define GetProcAddress(x, y)
Definition: compat.h:753
#define FreeLibrary(x)
Definition: compat.h:748
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
Definition: fileinfo.c:620
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
Definition: loader.c:111
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
Definition: lstring.c:100
#define ZeroMemory
Definition: minwinbase.h:31
Definition: files.c:526
static HMODULE hCabinet
Definition: urlmon_main.c:43
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
#define ERROR_PATH_NOT_FOUND
Definition: winerror.h:228

Referenced by ExtractFilesW().

◆ ExtractFilesW()

HRESULT WINAPI ExtractFilesW ( LPCWSTR  CabName,
LPCWSTR  ExpandDir,
DWORD  Flags,
LPCWSTR  FileList,
LPVOID  LReserved,
DWORD  Reserved 
)

Definition at line 777 of file files.c.

779{
780 char *cab_name = NULL, *expand_dir = NULL, *file_list = NULL;
781 HRESULT hres = S_OK;
782
783 TRACE("(%s, %s, %ld, %s, %p, %ld)\n", debugstr_w(CabName), debugstr_w(ExpandDir),
784 Flags, debugstr_w(FileList), LReserved, Reserved);
785
786 if(CabName) {
787 cab_name = strdupWtoA(CabName);
788 if(!cab_name)
789 return E_OUTOFMEMORY;
790 }
791
792 if(ExpandDir) {
793 expand_dir = strdupWtoA(ExpandDir);
794 if(!expand_dir)
796 }
797
798 if(SUCCEEDED(hres) && FileList) {
800 if(!file_list)
802 }
803
804 /* cabinet.dll, which does the real job of extracting files, doesn't have UNICODE API,
805 so we need W->A conversion at some point anyway. */
806 if(SUCCEEDED(hres))
807 hres = ExtractFilesA(cab_name, expand_dir, Flags, file_list, LReserved, Reserved);
808
809 free(cab_name);
810 free(expand_dir);
812 return hres;
813}
static char * strdupWtoA(const WCHAR *str)
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
HRESULT WINAPI ExtractFilesA(LPCSTR CabName, LPCSTR ExpandDir, DWORD Flags, LPCSTR FileList, LPVOID LReserved, DWORD Reserved)
Definition: files.c:685
#define SUCCEEDED(hr)
Definition: intsafe.h:50
HRESULT hres
Definition: protocol.c:465

Referenced by ExecuteCabW(), and extract_cab_file().

◆ file_in_list()

static BOOL file_in_list ( LPCSTR  szFile,
LPCSTR  szFileList 
)
static

Definition at line 598 of file files.c.

599{
600 DWORD dwLen = lstrlenA(szFile);
601 DWORD dwTestLen;
602
603 while (*szFileList)
604 {
605 dwTestLen = lstrlenA(szFileList);
606
607 if (dwTestLen == dwLen)
608 {
609 if (!lstrcmpiA(szFile, szFileList))
610 return TRUE;
611 }
612
613 szFileList += dwTestLen + 1;
614 }
615
616 return FALSE;
617}
int WINAPI lstrcmpiA(LPCSTR str1, LPCSTR str2)
Definition: locale.c:4133

Referenced by fill_file_list().

◆ FileSaveMarkNotExistA()

HRESULT WINAPI FileSaveMarkNotExistA ( LPSTR  pszFileList,
LPSTR  pszDir,
LPSTR  pszBaseName 
)

Definition at line 820 of file files.c.

821{
822 TRACE("(%s, %s, %s)\n", debugstr_a(pszFileList),
823 debugstr_a(pszDir), debugstr_a(pszBaseName));
824
825 return AddDelBackupEntryA(pszFileList, pszDir, pszBaseName, AADBE_DEL_ENTRY);
826}
HRESULT WINAPI AddDelBackupEntryA(LPCSTR lpcszFileList, LPCSTR lpcszBackupDir, LPCSTR lpcszBaseName, DWORD dwFlags)
Definition: files.c:59
_In_ LPCSTR pszDir
Definition: shellapi.h:609

◆ FileSaveMarkNotExistW()

HRESULT WINAPI FileSaveMarkNotExistW ( LPWSTR  pszFileList,
LPWSTR  pszDir,
LPWSTR  pszBaseName 
)

Definition at line 843 of file files.c.

844{
845 TRACE("(%s, %s, %s)\n", debugstr_w(pszFileList),
846 debugstr_w(pszDir), debugstr_w(pszBaseName));
847
848 return AddDelBackupEntryW(pszFileList, pszDir, pszBaseName, AADBE_DEL_ENTRY);
849}

◆ FileSaveRestoreA()

HRESULT WINAPI FileSaveRestoreA ( HWND  hDlg,
LPSTR  pszFileList,
LPSTR  pszDir,
LPSTR  pszBaseName,
DWORD  dwFlags 
)

Definition at line 856 of file files.c.

858{
859 UNICODE_STRING filelist, dir, basename;
860 HRESULT hr;
861
862 TRACE("(%p, %s, %s, %s, %ld)\n", hDlg, debugstr_a(pszFileList),
863 debugstr_a(pszDir), debugstr_a(pszBaseName), dwFlags);
864
865 RtlCreateUnicodeStringFromAsciiz(&filelist, pszFileList);
868
869 hr = FileSaveRestoreW(hDlg, filelist.Buffer, dir.Buffer,
870 basename.Buffer, dwFlags);
871
872 RtlFreeUnicodeString(&filelist);
875
876 return hr;
877}
unsigned int dir
Definition: maze.c:112
HRESULT WINAPI FileSaveRestoreW(HWND hDlg, LPWSTR pszFileList, LPWSTR pszDir, LPWSTR pszBaseName, DWORD dwFlags)
Definition: files.c:901

◆ FileSaveRestoreOnINFA()

HRESULT WINAPI FileSaveRestoreOnINFA ( HWND  hWnd,
LPCSTR  pszTitle,
LPCSTR  pszINF,
LPCSTR  pszSection,
LPCSTR  pszBackupDir,
LPCSTR  pszBaseBackupFile,
DWORD  dwFlags 
)

Definition at line 915 of file files.c.

918{
920 UNICODE_STRING backupdir, backupfile;
921 HRESULT hr;
922
923 TRACE("(%p, %s, %s, %s, %s, %s, %ld)\n", hWnd, debugstr_a(pszTitle),
924 debugstr_a(pszINF), debugstr_a(pszSection), debugstr_a(pszBackupDir),
925 debugstr_a(pszBaseBackupFile), dwFlags);
926
930 RtlCreateUnicodeStringFromAsciiz(&backupdir, pszBackupDir);
931 RtlCreateUnicodeStringFromAsciiz(&backupfile, pszBaseBackupFile);
932
933 hr = FileSaveRestoreOnINFW(hWnd, title.Buffer, inf.Buffer, section.Buffer,
934 backupdir.Buffer, backupfile.Buffer, dwFlags);
935
939 RtlFreeUnicodeString(&backupdir);
940 RtlFreeUnicodeString(&backupfile);
941
942 return hr;
943}
HRESULT WINAPI FileSaveRestoreOnINFW(HWND hWnd, LPCWSTR pszTitle, LPCWSTR pszINF, LPCWSTR pszSection, LPCWSTR pszBackupDir, LPCWSTR pszBaseBackupFile, DWORD dwFlags)
Definition: files.c:968
static char title[]
Definition: ps.c:92
Definition: parser.c:56

◆ FileSaveRestoreOnINFW()

HRESULT WINAPI FileSaveRestoreOnINFW ( HWND  hWnd,
LPCWSTR  pszTitle,
LPCWSTR  pszINF,
LPCWSTR  pszSection,
LPCWSTR  pszBackupDir,
LPCWSTR  pszBaseBackupFile,
DWORD  dwFlags 
)

Definition at line 968 of file files.c.

971{
972 FIXME("(%p, %s, %s, %s, %s, %s, %ld): stub\n", hWnd, debugstr_w(pszTitle),
973 debugstr_w(pszINF), debugstr_w(pszSection), debugstr_w(pszBackupDir),
974 debugstr_w(pszBaseBackupFile), dwFlags);
975
976 return E_FAIL;
977}

Referenced by FileSaveRestoreOnINFA().

◆ FileSaveRestoreW()

HRESULT WINAPI FileSaveRestoreW ( HWND  hDlg,
LPWSTR  pszFileList,
LPWSTR  pszDir,
LPWSTR  pszBaseName,
DWORD  dwFlags 
)

Definition at line 901 of file files.c.

903{
904 FIXME("(%p, %s, %s, %s, %ld) stub\n", hDlg, debugstr_w(pszFileList),
905 debugstr_w(pszDir), debugstr_w(pszBaseName), dwFlags);
906
907 return E_FAIL;
908}

Referenced by FileSaveRestoreA().

◆ fill_file_list()

static DWORD fill_file_list ( SESSION session,
LPCSTR  szCabName,
LPCSTR  szFileList 
)
static

Definition at line 621 of file files.c.

622{
623 DWORD dwNumFound = 0;
624 struct FILELIST *pNode;
625
626 session->Operation |= EXTRACT_FILLFILELIST;
627 if (pExtract(session, szCabName) != S_OK)
628 {
629 session->Operation &= ~EXTRACT_FILLFILELIST;
630 return -1;
631 }
632
633 pNode = session->FileList;
634 while (pNode)
635 {
636 if (!file_in_list(pNode->FileName, szFileList))
637 pNode->DoExtract = FALSE;
638 else
639 dwNumFound++;
640
641 pNode = pNode->next;
642 }
643
644 session->Operation &= ~EXTRACT_FILLFILELIST;
645 return dwNumFound;
646}
static BOOL file_in_list(LPCSTR szFile, LPCSTR szFileList)
Definition: files.c:598
struct FILELIST * next
Definition: files.c:522
LPSTR FileName
Definition: files.c:521
BOOL DoExtract
Definition: files.c:523

Referenced by ExtractFilesA().

◆ free_file_list()

static void free_file_list ( SESSION session)
static

Definition at line 648 of file files.c.

649{
650 struct FILELIST *next, *curr = session->FileList;
651
652 while (curr)
653 {
654 next = curr->next;
655 free_file_node(curr);
656 curr = next;
657 }
658}
static void free_file_node(struct FILELIST *pNode)
Definition: files.c:591
static unsigned __int64 next
Definition: rand_nt.c:6

Referenced by ExtractFilesA().

◆ free_file_node()

static void free_file_node ( struct FILELIST pNode)
static

Definition at line 591 of file files.c.

592{
593 free(pNode->FileName);
594 free(pNode);
595}

Referenced by free_file_list().

◆ GetVersionFromFileA()

HRESULT WINAPI GetVersionFromFileA ( LPCSTR  Filename,
LPDWORD  MajorVer,
LPDWORD  MinorVer,
BOOL  Version 
)

Definition at line 984 of file files.c.

986{
987 TRACE("(%s, %p, %p, %d)\n", debugstr_a(Filename), MajorVer, MinorVer, Version);
988 return GetVersionFromFileExA(Filename, MajorVer, MinorVer, Version);
989}
HRESULT WINAPI GetVersionFromFileExA(LPCSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1015
IN PVCB IN PBCB OUT PDIRENT IN USHORT IN POEM_STRING Filename
Definition: fatprocs.h:940
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID _Out_ PINTERFACE _In_ USHORT _In_ USHORT Version
Definition: wdffdo.h:469

◆ GetVersionFromFileExA()

HRESULT WINAPI GetVersionFromFileExA ( LPCSTR  lpszFilename,
LPDWORD  pdwMSVer,
LPDWORD  pdwLSVer,
BOOL  bVersion 
)

Definition at line 1015 of file files.c.

1017{
1019 HRESULT res;
1020
1021 TRACE("(%s, %p, %p, %d)\n", debugstr_a(lpszFilename),
1022 pdwMSVer, pdwLSVer, bVersion);
1023
1025
1026 res = GetVersionFromFileExW(filename.Buffer, pdwMSVer, pdwLSVer, bVersion);
1027
1029
1030 return res;
1031}
HRESULT WINAPI GetVersionFromFileExW(LPCWSTR lpszFilename, LPDWORD pdwMSVer, LPDWORD pdwLSVer, BOOL bVersion)
Definition: files.c:1051
const char * filename
Definition: ioapi.h:137

Referenced by GetVersionFromFileA().

◆ GetVersionFromFileExW()

HRESULT WINAPI GetVersionFromFileExW ( LPCWSTR  lpszFilename,
LPDWORD  pdwMSVer,
LPDWORD  pdwLSVer,
BOOL  bVersion 
)

Definition at line 1051 of file files.c.

1053{
1054 VS_FIXEDFILEINFO *pFixedVersionInfo;
1055 LANGANDCODEPAGE *pLangAndCodePage;
1056 DWORD dwHandle, dwInfoSize;
1057 WCHAR szWinDir[MAX_PATH];
1058 WCHAR szFile[MAX_PATH];
1059 LPVOID pVersionInfo = NULL;
1060 BOOL bFileCopied = FALSE;
1061 UINT uValueLen;
1062
1063 TRACE("(%s, %p, %p, %d)\n", debugstr_w(lpszFilename),
1064 pdwMSVer, pdwLSVer, bVersion);
1065
1066 *pdwLSVer = 0;
1067 *pdwMSVer = 0;
1068
1069 lstrcpynW(szFile, lpszFilename, MAX_PATH);
1070
1071 dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1072 if (!dwInfoSize)
1073 {
1074 /* check that the file exists */
1076 return S_OK;
1077
1078 /* file exists, but won't be found by GetFileVersionInfoSize,
1079 * so copy it to the temp dir where it will be found.
1080 */
1081 GetWindowsDirectoryW(szWinDir, MAX_PATH);
1082 GetTempFileNameW(szWinDir, NULL, 0, szFile);
1083 CopyFileW(lpszFilename, szFile, FALSE);
1084 bFileCopied = TRUE;
1085
1086 dwInfoSize = GetFileVersionInfoSizeW(szFile, &dwHandle);
1087 if (!dwInfoSize)
1088 goto done;
1089 }
1090
1091 pVersionInfo = malloc(dwInfoSize);
1092 if (!pVersionInfo)
1093 goto done;
1094
1095 if (!GetFileVersionInfoW(szFile, dwHandle, dwInfoSize, pVersionInfo))
1096 goto done;
1097
1098 if (bVersion)
1099 {
1100 if (!VerQueryValueW(pVersionInfo, L"\\", (void **)&pFixedVersionInfo, &uValueLen))
1101 goto done;
1102
1103 if (!uValueLen)
1104 goto done;
1105
1106 *pdwMSVer = pFixedVersionInfo->dwFileVersionMS;
1107 *pdwLSVer = pFixedVersionInfo->dwFileVersionLS;
1108 }
1109 else
1110 {
1111 if (!VerQueryValueW(pVersionInfo, L"\\VarFileInfo\\Translation",
1112 (LPVOID *)&pLangAndCodePage, &uValueLen))
1113 goto done;
1114
1115 if (!uValueLen)
1116 goto done;
1117
1118 *pdwMSVer = pLangAndCodePage->wLanguage;
1119 *pdwLSVer = pLangAndCodePage->wCodePage;
1120 }
1121
1122done:
1123 free(pVersionInfo);
1124
1125 if (bFileCopied)
1126 DeleteFileW(szFile);
1127
1128 return S_OK;
1129}
BOOL WINAPI CopyFileW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName, IN BOOL bFailIfExists)
Definition: copy.c:367
BOOL WINAPI GetFileVersionInfoW(LPCWSTR filename, DWORD handle, DWORD datasize, LPVOID data)
Definition: version.c:967
BOOL WINAPI VerQueryValueW(LPCVOID pBlock, LPCWSTR lpSubBlock, LPVOID *lplpBuffer, PUINT puLen)
Definition: version.c:1171
DWORD WINAPI GetFileVersionInfoSizeW(LPCWSTR filename, LPDWORD handle)
Definition: version.c:738
UINT WINAPI GetTempFileNameW(IN LPCWSTR lpPathName, IN LPCWSTR lpPrefixString, IN UINT uUnique, OUT LPWSTR lpTempFileName)
Definition: filename.c:84
unsigned int UINT
Definition: sysinfo.c:13

Referenced by GetVersionFromFileExA(), and GetVersionFromFileW().

◆ GetVersionFromFileW()

HRESULT WINAPI GetVersionFromFileW ( LPCWSTR  Filename,
LPDWORD  MajorVer,
LPDWORD  MinorVer,
BOOL  Version 
)

Definition at line 996 of file files.c.

998{
999 TRACE("(%s, %p, %p, %d)\n", debugstr_w(Filename), MajorVer, MinorVer, Version);
1000 return GetVersionFromFileExW(Filename, MajorVer, MinorVer, Version);
1001}

◆ HRESULT()

static HRESULT ( WINAPI pExtract)
static

◆ pQueueCallback()

static UINT CALLBACK pQueueCallback ( PVOID  Context,
UINT  Notification,
UINT_PTR  Param1,
UINT_PTR  Param2 
)
static

Definition at line 167 of file files.c.

169{
170 /* only be verbose for error notifications */
171 if (!Notification ||
175 {
177 Param1, Param2);
178 }
179
180 return 1;
181}
UINT WINAPI SetupDefaultQueueCallbackW(PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2)
Definition: queue.c:1729
#define SPFILENOTIFY_RENAMEERROR
Definition: fileqsup.h:33
#define SPFILENOTIFY_DELETEERROR
Definition: fileqsup.h:29
#define SPFILENOTIFY_COPYERROR
Definition: fileqsup.h:37
_In_ PVOID Context
Definition: storport.h:2269
_In_ PWDFDEVICE_INIT _In_ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification
Definition: wdfcontrol.h:115

Referenced by AdvInstallFileW().

◆ pQuietQueueCallback()

static UINT CALLBACK pQuietQueueCallback ( PVOID  Context,
UINT  Notification,
UINT_PTR  Param1,
UINT_PTR  Param2 
)
static

Definition at line 161 of file files.c.

163{
164 return 1;
165}

Referenced by AdvInstallFileW().

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( advpack  )

Variable Documentation

◆ LPCSTR

Definition at line 538 of file files.c.