Search driver files in the same directory as the .inf file
[reactos.git] / reactos / dll / win32 / setupapi / setupapi_private.h
index ec88911..50acfed 100644 (file)
 #include "rpc_private.h"
 #include "resource.h"
 
+#ifdef __REACTOS__
+#undef __WINESRC__
+#endif
+
 #define SETUP_DEV_INFO_SET_MAGIC 0xd00ff057
 #define SETUP_CLASS_IMAGE_LIST_MAGIC 0xd00ff058
 
@@ -68,8 +72,16 @@ struct InfFileDetails
     HINF hInf;
     LONG References;
 
-    /* May contain no directory if the file is already in %SYSTEMROOT%\Inf */
-    WCHAR FullInfFileName[ANYSIZE_ARRAY];
+    /* Contains the directory name of the .inf file. This field may
+     * be NULL if the file is already in %SYSTEMROOT%\Inf.
+     * Points into szData at then end of the structure */
+    PCWSTR DirectoryName;
+    /* Contains the full file name of the .inf file. However, the directory
+     * part may be missing if the file is already in %SYSTEMROOT%\Inf.
+     * Points into szData at then end of the structure */
+    PCWSTR FullInfFileName;
+
+    WCHAR szData[ANYSIZE_ARRAY];
 };
 
 struct DriverInfoElement /* Element of DeviceInfoSet.DriverListHead and DeviceInfoElement.DriverListHead */
@@ -189,12 +201,13 @@ extern HINSTANCE hInstance;
 /* string substitutions */
 
 struct inf_file;
-extern const WCHAR *DIRID_get_string( HINF hinf, int dirid );
+extern const WCHAR *DIRID_get_string( int dirid );
+extern const WCHAR *PARSER_get_inf_filename( HINF hinf );
 extern unsigned int PARSER_string_substA( struct inf_file *file, const WCHAR *text,
                                           char *buffer, unsigned int size );
 extern unsigned int PARSER_string_substW( struct inf_file *file, const WCHAR *text,
                                           WCHAR *buffer, unsigned int size );
-extern const WCHAR *PARSER_get_src_root( HINF hinf );
+extern WCHAR *PARSER_get_src_root( HINF hinf );
 extern WCHAR *PARSER_get_dest_dir( INFCONTEXT *context );
 
 /* support for Ascii queue callback functions */