diff --git a/dlls/setupapi/queue.c b/dlls/setupapi/queue.c index d205e927c37..291899ac68a 100644 --- a/dlls/setupapi/queue.c +++ b/dlls/setupapi/queue.c @@ -1310,6 +1310,7 @@ UINT WINAPI SetupDefaultQueueCallbackA( PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2 ) { FILEPATHS_A *paths = (FILEPATHS_A *)param1; + struct default_callback_context *ctx = (struct default_callback_context *)context; switch(notification) { @@ -1332,7 +1333,9 @@ UINT WINAPI SetupDefaultQueueCallbackA( PVOID context, UINT notification, TRACE( "end delete %s\n", debugstr_a(paths->Target) ); return 0; case SPFILENOTIFY_DELETEERROR: - ERR( "delete error %d %s\n", paths->Win32Error, debugstr_a(paths->Target) ); + /*Windows Ignores attempts to delete files / folders which do not exist*/ + if ((paths->Win32Error != ERROR_FILE_NOT_FOUND) && (paths->Win32Error != ERROR_PATH_NOT_FOUND)) + SetupDeleteErrorA(ctx->owner, NULL, paths->Target, paths->Win32Error, 0); return FILEOP_SKIP; case SPFILENOTIFY_STARTRENAME: TRACE( "start rename %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); @@ -1341,8 +1344,7 @@ UINT WINAPI SetupDefaultQueueCallbackA( PVOID context, UINT notification, TRACE( "end rename %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); return 0; case SPFILENOTIFY_RENAMEERROR: - ERR( "rename error %d %s -> %s\n", paths->Win32Error, - debugstr_a(paths->Source), debugstr_a(paths->Target) ); + SetupRenameErrorA(ctx->owner, NULL, paths->Source, paths->Target, paths->Win32Error, 0); return FILEOP_SKIP; case SPFILENOTIFY_STARTCOPY: TRACE( "start copy %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); @@ -1372,6 +1374,7 @@ UINT WINAPI SetupDefaultQueueCallbackW( PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2 ) { FILEPATHS_W *paths = (FILEPATHS_W *)param1; + struct default_callback_context *ctx = (struct default_callback_context *)context; switch(notification) { @@ -1394,10 +1397,12 @@ UINT WINAPI SetupDefaultQueueCallbackW( PVOID context, UINT notification, TRACE( "end delete %s\n", debugstr_w(paths->Target) ); return 0; case SPFILENOTIFY_DELETEERROR: - ERR( "delete error %d %s\n", paths->Win32Error, debugstr_w(paths->Target) ); + /*Windows Ignores attempts to delete files / folders which do not exist*/ + if ((paths->Win32Error != ERROR_FILE_NOT_FOUND) && (paths->Win32Error != ERROR_PATH_NOT_FOUND)) + SetupDeleteErrorW(ctx->owner, NULL, paths->Target, paths->Win32Error, 0); return FILEOP_SKIP; case SPFILENOTIFY_STARTRENAME: - TRACE( "start rename %s -> %s\n", debugstr_w(paths->Source), debugstr_w(paths->Target) ); + SetupRenameErrorW(ctx->owner, NULL, paths->Source, paths->Target, paths->Win32Error, 0); return FILEOP_DOIT; case SPFILENOTIFY_ENDRENAME: TRACE( "end rename %s -> %s\n", debugstr_w(paths->Source), debugstr_w(paths->Target) ); @@ -1425,3 +1430,80 @@ UINT WINAPI SetupDefaultQueueCallbackW( PVOID context, UINT notification, } return 0; } + +/*********************************************************************** + * SetupDeleteErrorA (SETUPAPI.@) + */ + +UINT WINAPI SetupDeleteErrorA( HWND parent, PCSTR dialogTitle, PCSTR file, + UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to delete %s)\n", + w32error, debugstr_a(file) ); + return DPROMPT_SKIPFILE; +} + +/*********************************************************************** + * SetupDeleteErrorW (SETUPAPI.@) + */ + +UINT WINAPI SetupDeleteErrorW( HWND parent, PCWSTR dialogTitle, PCWSTR file, + UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to delete %s)\n", + w32error, debugstr_w(file) ); + return DPROMPT_SKIPFILE; +} + +/*********************************************************************** + * SetupRenameErrorA (SETUPAPI.@) + */ + +UINT WINAPI SetupRenameErrorA( HWND parent, PCSTR dialogTitle, PCSTR source, + PCSTR target, UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to rename %s to %s)\n", + w32error, debugstr_a(source), debugstr_a(target)); + return DPROMPT_SKIPFILE; +} + +/*********************************************************************** + * SetupRenameErrorW (SETUPAPI.@) + */ + +UINT WINAPI SetupRenameErrorW( HWND parent, PCWSTR dialogTitle, PCWSTR source, + PCWSTR target, UINT w32error, DWORD style) +{ + FIXME( "stub: (Error Number %d when attempting to rename %s to %s)\n", + w32error, debugstr_w(source), debugstr_w(target)); + return DPROMPT_SKIPFILE; +} + + +/*********************************************************************** + * SetupCopyErrorA (SETUPAPI.@) + */ + +UINT WINAPI SetupCopyErrorA( HWND parent, PCSTR dialogTitle, PCSTR diskname, + PCSTR sourcepath, PCSTR sourcefile, PCSTR targetpath, + UINT w32error, DWORD style, PSTR pathbuffer, + DWORD buffersize, PDWORD requiredsize) +{ + FIXME( "stub: (Error Number %d when attempting to copy file %s from %s to %s)\n", + w32error, debugstr_a(sourcefile), debugstr_a(sourcepath) ,debugstr_a(targetpath)); + return DPROMPT_SKIPFILE; +} + +/*********************************************************************** + * SetupCopyErrorW (SETUPAPI.@) + */ + +UINT WINAPI SetupCopyErrorW( HWND parent, PCWSTR dialogTitle, PCWSTR diskname, + PCWSTR sourcepath, PCWSTR sourcefile, PCWSTR targetpath, + UINT w32error, DWORD style, PWSTR pathbuffer, + DWORD buffersize, PDWORD requiredsize) +{ + FIXME( "stub: (Error Number %d when attempting to copy file %s from %s to %s)\n", + w32error, debugstr_w(sourcefile), debugstr_w(sourcepath) ,debugstr_w(targetpath)); + return DPROMPT_SKIPFILE; +} diff --git a/dlls/setupapi/setupapi.spec b/dlls/setupapi/setupapi.spec index 4529a5ec202..c87752ae8a9 100644 --- a/dlls/setupapi/setupapi.spec +++ b/dlls/setupapi/setupapi.spec @@ -250,8 +250,8 @@ @ stdcall SetupCommitFileQueue(long long ptr ptr) SetupCommitFileQueueW @ stdcall SetupCommitFileQueueA(long long ptr ptr) @ stdcall SetupCommitFileQueueW(long long ptr ptr) -@ stub SetupCopyErrorA -@ stub SetupCopyErrorW +@ stdcall SetupCopyErrorA(long str str str str str long long str long ptr) +@ stdcall SetupCopyErrorW(long wstr wstr wstr wstr wstr long long wstr long ptr) @ stdcall SetupCopyOEMInfA(str str long long ptr long ptr ptr) @ stdcall SetupCopyOEMInfW(wstr wstr long long ptr long ptr ptr) @ stdcall SetupCreateDiskSpaceListA(ptr long long) @@ -261,8 +261,8 @@ @ stub SetupDefaultQueueCallback @ stdcall SetupDefaultQueueCallbackA(ptr long long long) @ stdcall SetupDefaultQueueCallbackW(ptr long long long) -@ stub SetupDeleteErrorA -@ stub SetupDeleteErrorW +@ stdcall SetupDeleteErrorA(long str str long long) +@ stdcall SetupDeleteErrorW(long wstr wstr long long) @ stdcall SetupDestroyDiskSpaceList(long) @ stub SetupDiAskForOEMDisk @ stdcall SetupDiBuildClassInfoList(long ptr long ptr) @@ -493,8 +493,8 @@ @ stub SetupRemoveInstallSectionFromDiskSpaceListW @ stub SetupRemoveSectionFromDiskSpaceListA @ stub SetupRemoveSectionFromDiskSpaceListW -@ stub SetupRenameErrorA -@ stub SetupRenameErrorW +@ stdcall SetupRenameErrorA(long str str str long long) +@ stdcall SetupRenameErrorW(long wstr wstr wstr long long) @ stub SetupScanFileQueue @ stdcall SetupScanFileQueueA(long long long ptr ptr ptr) @ stdcall SetupScanFileQueueW(long long long ptr ptr ptr)