setupapi: Add a FIXME in SetupCopyOEMInfW for when we should be copying a catalog file.

Robert Shearman rob at codeweavers.com
Sat May 26 03:05:13 CDT 2007


---
  dlls/setupapi/misc.c |   24 +++++++++++++++++++++++-
  1 files changed, 23 insertions(+), 1 deletions(-)
-------------- next part --------------
diff --git a/dlls/setupapi/misc.c b/dlls/setupapi/misc.c
index 2a91b17..c4da770 100644
--- a/dlls/setupapi/misc.c
+++ b/dlls/setupapi/misc.c
@@ -950,9 +950,12 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR sou
                               DWORD buffer_size, PDWORD required_size, PWSTR *component )
 {
     BOOL ret = FALSE;
-    WCHAR target[MAX_PATH], *p;
+    WCHAR target[MAX_PATH], catalog_file[MAX_PATH], *p;
     static const WCHAR inf[] = { '\\','i','n','f','\\',0 };
+    static const WCHAR wszVersion[] = { 'V','e','r','s','i','o','n',0 };
+    static const WCHAR wszCatalogFile[] = { 'C','a','t','a','l','o','g','F','i','l','e',0 };
     DWORD size;
+    HINF hinf;
 
     TRACE("%s, %s, %d, %d, %p, %d, %p, %p\n", debugstr_w(source), debugstr_w(location),
           media_type, style, dest, buffer_size, required_size, component);
@@ -1036,6 +1039,25 @@ BOOL WINAPI SetupCopyOEMInfW( PCWSTR sou
         }
     }
 
+    hinf = SetupOpenInfFileW( source, NULL, INF_STYLE_WIN4, NULL );
+    if (hinf == INVALID_HANDLE_VALUE) return FALSE;
+
+    if (SetupGetLineTextW( NULL, hinf, wszVersion, wszCatalogFile, catalog_file,
+                           sizeof(catalog_file)/sizeof(catalog_file[0]), NULL ))
+    {
+        WCHAR source_cat[MAX_PATH];
+        strcpyW( source_cat, source );
+    
+        p = strrchrW( source_cat, '\\' );
+        if (p) p++;
+        else p = source_cat;
+
+        strcpyW( p, catalog_file );
+
+        FIXME("install catalog file %s\n", debugstr_w( source_cat ));
+    }
+    SetupCloseInfFile( hinf );
+    
     if (!(ret = CopyFileW( source, target, (style & SP_COPY_NOOVERWRITE) != 0 )))
         return ret;
 


More information about the wine-patches mailing list