Commit 5014e742 authored by Matthew Davison's avatar Matthew Davison Committed by Alexandre Julliard

Stub out the error dialog functions.

Modify the default callbacks to call these for Delete and Rename errors. Modify the default callbacks to ignore file missing errors when deleting files.
parent a9983c8d
...@@ -1310,6 +1310,7 @@ UINT WINAPI SetupDefaultQueueCallbackA( PVOID context, UINT notification, ...@@ -1310,6 +1310,7 @@ UINT WINAPI SetupDefaultQueueCallbackA( PVOID context, UINT notification,
UINT_PTR param1, UINT_PTR param2 ) UINT_PTR param1, UINT_PTR param2 )
{ {
FILEPATHS_A *paths = (FILEPATHS_A *)param1; FILEPATHS_A *paths = (FILEPATHS_A *)param1;
struct default_callback_context *ctx = (struct default_callback_context *)context;
switch(notification) switch(notification)
{ {
...@@ -1332,7 +1333,9 @@ UINT WINAPI SetupDefaultQueueCallbackA( PVOID context, UINT notification, ...@@ -1332,7 +1333,9 @@ UINT WINAPI SetupDefaultQueueCallbackA( PVOID context, UINT notification,
TRACE( "end delete %s\n", debugstr_a(paths->Target) ); TRACE( "end delete %s\n", debugstr_a(paths->Target) );
return 0; return 0;
case SPFILENOTIFY_DELETEERROR: 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; return FILEOP_SKIP;
case SPFILENOTIFY_STARTRENAME: case SPFILENOTIFY_STARTRENAME:
TRACE( "start rename %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); 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, ...@@ -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) ); TRACE( "end rename %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) );
return 0; return 0;
case SPFILENOTIFY_RENAMEERROR: case SPFILENOTIFY_RENAMEERROR:
ERR( "rename error %d %s -> %s\n", paths->Win32Error, SetupRenameErrorA(ctx->owner, NULL, paths->Source, paths->Target, paths->Win32Error, 0);
debugstr_a(paths->Source), debugstr_a(paths->Target) );
return FILEOP_SKIP; return FILEOP_SKIP;
case SPFILENOTIFY_STARTCOPY: case SPFILENOTIFY_STARTCOPY:
TRACE( "start copy %s -> %s\n", debugstr_a(paths->Source), debugstr_a(paths->Target) ); 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, ...@@ -1372,6 +1374,7 @@ UINT WINAPI SetupDefaultQueueCallbackW( PVOID context, UINT notification,
UINT_PTR param1, UINT_PTR param2 ) UINT_PTR param1, UINT_PTR param2 )
{ {
FILEPATHS_W *paths = (FILEPATHS_W *)param1; FILEPATHS_W *paths = (FILEPATHS_W *)param1;
struct default_callback_context *ctx = (struct default_callback_context *)context;
switch(notification) switch(notification)
{ {
...@@ -1394,10 +1397,12 @@ UINT WINAPI SetupDefaultQueueCallbackW( PVOID context, UINT notification, ...@@ -1394,10 +1397,12 @@ UINT WINAPI SetupDefaultQueueCallbackW( PVOID context, UINT notification,
TRACE( "end delete %s\n", debugstr_w(paths->Target) ); TRACE( "end delete %s\n", debugstr_w(paths->Target) );
return 0; return 0;
case SPFILENOTIFY_DELETEERROR: 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; return FILEOP_SKIP;
case SPFILENOTIFY_STARTRENAME: 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; return FILEOP_DOIT;
case SPFILENOTIFY_ENDRENAME: case SPFILENOTIFY_ENDRENAME:
TRACE( "end rename %s -> %s\n", debugstr_w(paths->Source), debugstr_w(paths->Target) ); 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, ...@@ -1425,3 +1430,80 @@ UINT WINAPI SetupDefaultQueueCallbackW( PVOID context, UINT notification,
} }
return 0; 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;
}
...@@ -250,8 +250,8 @@ ...@@ -250,8 +250,8 @@
@ stdcall SetupCommitFileQueue(long long ptr ptr) SetupCommitFileQueueW @ stdcall SetupCommitFileQueue(long long ptr ptr) SetupCommitFileQueueW
@ stdcall SetupCommitFileQueueA(long long ptr ptr) @ stdcall SetupCommitFileQueueA(long long ptr ptr)
@ stdcall SetupCommitFileQueueW(long long ptr ptr) @ stdcall SetupCommitFileQueueW(long long ptr ptr)
@ stub SetupCopyErrorA @ stdcall SetupCopyErrorA(long str str str str str long long str long ptr)
@ stub SetupCopyErrorW @ stdcall SetupCopyErrorW(long wstr wstr wstr wstr wstr long long wstr long ptr)
@ stdcall SetupCopyOEMInfA(str str long long ptr long ptr ptr) @ stdcall SetupCopyOEMInfA(str str long long ptr long ptr ptr)
@ stdcall SetupCopyOEMInfW(wstr wstr long long ptr long ptr ptr) @ stdcall SetupCopyOEMInfW(wstr wstr long long ptr long ptr ptr)
@ stdcall SetupCreateDiskSpaceListA(ptr long long) @ stdcall SetupCreateDiskSpaceListA(ptr long long)
...@@ -261,8 +261,8 @@ ...@@ -261,8 +261,8 @@
@ stub SetupDefaultQueueCallback @ stub SetupDefaultQueueCallback
@ stdcall SetupDefaultQueueCallbackA(ptr long long long) @ stdcall SetupDefaultQueueCallbackA(ptr long long long)
@ stdcall SetupDefaultQueueCallbackW(ptr long long long) @ stdcall SetupDefaultQueueCallbackW(ptr long long long)
@ stub SetupDeleteErrorA @ stdcall SetupDeleteErrorA(long str str long long)
@ stub SetupDeleteErrorW @ stdcall SetupDeleteErrorW(long wstr wstr long long)
@ stdcall SetupDestroyDiskSpaceList(long) @ stdcall SetupDestroyDiskSpaceList(long)
@ stub SetupDiAskForOEMDisk @ stub SetupDiAskForOEMDisk
@ stdcall SetupDiBuildClassInfoList(long ptr long ptr) @ stdcall SetupDiBuildClassInfoList(long ptr long ptr)
...@@ -493,8 +493,8 @@ ...@@ -493,8 +493,8 @@
@ stub SetupRemoveInstallSectionFromDiskSpaceListW @ stub SetupRemoveInstallSectionFromDiskSpaceListW
@ stub SetupRemoveSectionFromDiskSpaceListA @ stub SetupRemoveSectionFromDiskSpaceListA
@ stub SetupRemoveSectionFromDiskSpaceListW @ stub SetupRemoveSectionFromDiskSpaceListW
@ stub SetupRenameErrorA @ stdcall SetupRenameErrorA(long str str str long long)
@ stub SetupRenameErrorW @ stdcall SetupRenameErrorW(long wstr wstr wstr long long)
@ stub SetupScanFileQueue @ stub SetupScanFileQueue
@ stdcall SetupScanFileQueueA(long long long ptr ptr ptr) @ stdcall SetupScanFileQueueA(long long long ptr ptr ptr)
@ stdcall SetupScanFileQueueW(long long long ptr ptr ptr) @ stdcall SetupScanFileQueueW(long long long ptr ptr ptr)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment