Search driver files in the same directory as the .inf file
[reactos.git] / reactos / dll / win32 / setupapi / install.c
index 5d5525f..ed89d55 100644 (file)
@@ -121,7 +121,7 @@ static BOOL copy_files_callback( HINF hinf, PCWSTR field, void *arg )
     struct files_callback_info *info = arg;
 
     if (field[0] == '@')  /* special case: copy single file */
-        SetupQueueDefaultCopyW( info->queue, info->layout, info->src_root, NULL, field, info->copy_flags );
+        SetupQueueDefaultCopyW( info->queue, info->layout, info->src_root, NULL, &field[1], info->copy_flags );
     else
         SetupQueueCopySectionW( info->queue, info->src_root, info->layout, hinf, field, info->copy_flags );
     return TRUE;
@@ -825,11 +825,11 @@ static BOOL needs_callback( HINF hinf, PCWSTR field, void *arg )
     switch (info->type)
     {
         case 0:
-            return SetupInstallFromInfSectionW(info->owner, hinf, field, info->flags,
+            return SetupInstallFromInfSectionW(info->owner, *(HINF*)hinf, field, info->flags,
                info->key_root, info->src_root, info->copy_flags, info->callback,
                info->context, info->devinfo, info->devinfo_data);
         case 1:
-            return SetupInstallServicesFromInfSectionExW(hinf, field, info->flags,
+            return SetupInstallServicesFromInfSectionExW(*(HINF*)hinf, field, info->flags,
                 info->devinfo, info->devinfo_data, info->reserved1, info->reserved2);
         default:
             ERR("Unknown info type %ld\n", info->type);
@@ -1167,7 +1167,7 @@ static BOOL InstallOneService(
     LPQUERY_SERVICE_CONFIG ServiceConfig = NULL;
     BOOL ret = FALSE;
 
-    HKEY hGroupOrderListKey = INVALID_HANDLE_VALUE;
+    HKEY hGroupOrderListKey = NULL;
     LPWSTR ServiceBinary = NULL;
     LPWSTR LoadOrderGroup = NULL;
     LPWSTR DisplayName = NULL;
@@ -1359,7 +1359,7 @@ cleanup:
         CloseServiceHandle(hSCManager);
     if (hService != NULL)
         CloseServiceHandle(hService);
-    if (hGroupOrderListKey != INVALID_HANDLE_VALUE)
+    if (hGroupOrderListKey != NULL)
         RegCloseKey(hGroupOrderListKey);
     MyFree(ServiceConfig);
     MyFree(ServiceBinary);