setupapi: Add support for DIRID_PRINTPROCESSOR and DIRID_COLOR.

Hans Leidekker hans at codeweavers.com
Tue Jan 13 03:45:13 CST 2009


Should fix http://bugs.winehq.org/show_bug.cgi?id=16906

 -Hans

diff --git a/dlls/setupapi/dirid.c b/dlls/setupapi/dirid.c
index 89f92fd..68717a0 100644
--- a/dlls/setupapi/dirid.c
+++ b/dlls/setupapi/dirid.c
@@ -83,6 +83,13 @@ static const WCHAR *create_system_dirid( int dirid )
     static const WCHAR System[]  = {'\\','s','y','s','t','e','m',0};
     static const WCHAR Spool[]   = {'\\','s','p','o','o','l',0};
     static const WCHAR UserProfile[] = {'U','S','E','R','P','R','O','F','I','L','E',0};
+    static const WCHAR Color[]       = {'\\','s','p','o','o','l','\\','d','r','i','v','e','r','s','\\','c','o','l','o','r',0};
+    static const WCHAR PrintProc[]   = {'\\','s','p','o','o','l','\\','p','r','t','p','r','o','c','s',0};
+#ifdef __i386__
+    static const WCHAR w32x86[] = {'\\','w','3','2','x','8','6',0};
+#elif defined(__x86_64)
+    static const WCHAR x64[]    = {'\\','x','6','4',0};
+#endif /* FIXME: other platforms */
 
     WCHAR buffer[MAX_PATH+32], *str;
     int len;
@@ -138,8 +145,20 @@ static const WCHAR *create_system_dirid( int dirid )
         return get_csidl_dir(CSIDL_PROFILE);
     case DIRID_LOADER:
         return C_Root;  /* FIXME */
-    case DIRID_COLOR:  /* FIXME */
-    case DIRID_PRINTPROCESSOR:  /* FIXME */
+    case DIRID_COLOR:
+        GetSystemDirectoryW( buffer, MAX_PATH );
+        strcatW( buffer, Color );
+        break;
+    case DIRID_PRINTPROCESSOR:
+        GetSystemDirectoryW( buffer, MAX_PATH );
+        strcatW( buffer, PrintProc );
+#ifdef __i386__
+        strcatW( buffer, w32x86 );
+        break;
+#elif defined(__x86_64)
+        strcatW( buffer, x64 );
+        break;
+#endif
     default:
         FIXME( "unknown dirid %d\n", dirid );
         return get_unknown_dirid();



More information about the wine-patches mailing list