Fix usage of DI_NOVCP flag
Modified: trunk/reactos/lib/setupapi/devinst.c
Modified: trunk/reactos/lib/setupapi/install.c
_____
Modified: trunk/reactos/lib/setupapi/devinst.c
--- trunk/reactos/lib/setupapi/devinst.c 2005-12-26 15:06:46 UTC
(rev 20335)
+++ trunk/reactos/lib/setupapi/devinst.c 2005-12-26 15:25:47 UTC
(rev 20336)
@@ -7369,34 +7369,6 @@
return TRUE;
}
-
-static UINT WINAPI
-NullInstallMsgHandler(
- IN PVOID Context,
- UINT Notification,
- UINT_PTR Param1,
- UINT_PTR Param2)
-{
- switch (Notification)
- {
- case SPFILENOTIFY_STARTQUEUE: return TRUE;
- case SPFILENOTIFY_ENDQUEUE: return 0;
- case SPFILENOTIFY_STARTSUBQUEUE: return TRUE;
- case SPFILENOTIFY_ENDSUBQUEUE: return 0;
- case SPFILENOTIFY_STARTDELETE: return FILEOP_SKIP;
- case SPFILENOTIFY_ENDDELETE: return 0;
- case SPFILENOTIFY_STARTRENAME: return FILEOP_SKIP;
- case SPFILENOTIFY_ENDRENAME: return 0;
- case SPFILENOTIFY_STARTCOPY: return FILEOP_SKIP;
- case SPFILENOTIFY_ENDCOPY: return 0;
- case SPFILENOTIFY_NEEDMEDIA: return FILEOP_SKIP;
- default:
- FIXME("Notification %u params %p, %p\n", Notification,
Param1, Param2 );
- break;
- }
- return 0;
-}
-
/***********************************************************************
* SetupDiInstallDevice (SETUPAPI.@)
*/
@@ -7516,7 +7488,7 @@
Result = SetupInstallFromInfSectionW(InstallParams.hwndParent,
SelectedDriver->InfFileDetails->hInf, SectionName,
DoAction, hKey, NULL, SP_COPY_NEWER,
- InstallParams.Flags & (DI_NOFILECOPY | DI_NOVCP) ?
NullInstallMsgHandler : SetupDefaultQueueCallback, Context,
+ SetupDefaultQueueCallback, Context,
DeviceInfoSet, DeviceInfoData);
if (!Result)
goto cleanup;
_____
Modified: trunk/reactos/lib/setupapi/install.c
--- trunk/reactos/lib/setupapi/install.c 2005-12-26 15:06:46 UTC
(rev 20335)
+++ trunk/reactos/lib/setupapi/install.c 2005-12-26 15:25:47 UTC
(rev 20336)
@@ -864,20 +864,29 @@
if (flags & SPINST_FILES)
{
+ SP_DEVINSTALL_PARAMS_W install_params;
struct files_callback_info info;
HSPFILEQ queue;
+ BOOL use_custom_queue;
BOOL ret;
- if (!(queue = SetupOpenFileQueue())) return FALSE;
- info.queue = queue;
+ install_params.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
+ use_custom_queue = SetupDiGetDeviceInstallParamsW(devinfo,
devinfo_data, &install_params) && (install_params.Flags & DI_NOVCP);
+ if (!use_custom_queue && ((queue = SetupOpenFileQueue()) ==
(HSPFILEQ)INVALID_HANDLE_VALUE ))
+ return FALSE;
+ info.queue = use_custom_queue ? install_params.FileQueue :
queue;
info.src_root = src_root;
info.copy_flags = copy_flags;
info.layout = hinf;
ret = (iterate_section_fields( hinf, section, CopyFiles,
copy_files_callback, &info ) &&
iterate_section_fields( hinf, section, DelFiles,
delete_files_callback, &info ) &&
- iterate_section_fields( hinf, section, RenFiles,
rename_files_callback, &info ) &&
- SetupCommitFileQueueW( owner, queue, callback, context
));
- SetupCloseFileQueue( queue );
+ iterate_section_fields( hinf, section, RenFiles,
rename_files_callback, &info ));
+ if (!use_custom_queue)
+ {
+ if (ret)
+ ret = SetupCommitFileQueueW( owner, queue, callback,
context );
+ SetupCloseFileQueue( queue );
+ }
if (!ret) return FALSE;
}
if (flags & SPINST_INIFILES)