Author: hpoussin
Date: Thu Aug 3 00:45:13 2006
New Revision: 23422
URL: http://svn.reactos.org/svn/reactos?rev=23422&view=rev
Log:
- Implement INF_STYLE_OLDNT style in SetupOpenInfFileW
- Add some documentation in header file
Modified:
trunk/reactos/dll/win32/setupapi/parser.c
trunk/reactos/dll/win32/setupapi/setupapi_private.h
Modified: trunk/reactos/dll/win32/setupapi/parser.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/parser.…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/parser.c (original)
+++ trunk/reactos/dll/win32/setupapi/parser.c Thu Aug 3 00:45:13 2006
@@ -910,7 +910,7 @@
*
* parse an INF file.
*/
-static struct inf_file *parse_file( HANDLE handle, UINT *error_line )
+static struct inf_file *parse_file( HANDLE handle, UINT *error_line, DWORD style )
{
void *buffer;
DWORD err = 0;
@@ -962,6 +962,8 @@
if (!err) /* now check signature */
{
int version_index = find_section( file, Version );
+ if (version_index == -1 && (style & INF_STYLE_OLDNT))
+ goto done;
if (version_index != -1)
{
struct line *line = find_line( file, version_index, Signature );
@@ -1148,6 +1150,12 @@
TRACE("%s %s %lx %p\n", debugstr_w(name), debugstr_w(class), style, error);
+ if (style & ~(INF_STYLE_OLDNT | INF_STYLE_WIN4))
+ {
+ SetLastError(ERROR_INVALID_PARAMETER);
+ return (HINF)INVALID_HANDLE_VALUE;
+ }
+
if (strchrW( name, '\\' ) || strchrW( name, '/' ))
{
if (!(len = GetFullPathNameW( name, 0, NULL, NULL ))) return (HINF)INVALID_HANDLE_VALUE;
@@ -1185,7 +1193,7 @@
if (handle != INVALID_HANDLE_VALUE)
{
- file = parse_file( handle, error );
+ file = parse_file( handle, error, style );
CloseHandle( handle );
}
if (!file)
Modified: trunk/reactos/dll/win32/setupapi/setupapi_private.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/setupap…
==============================================================================
--- trunk/reactos/dll/win32/setupapi/setupapi_private.h (original)
+++ trunk/reactos/dll/win32/setupapi/setupapi_private.h Thu Aug 3 00:45:13 2006
@@ -1,6 +1,6 @@
/*
* Copyright 2001 Andreas Mohr
- * Copyright 2005 Hervé Poussineau
+ * Copyright 2005-2006 Hervé Poussineau
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
@@ -54,6 +54,7 @@
{
LIST_ENTRY ListEntry;
+ /* Link to is parent device */
struct DeviceInfoElement* DeviceInfo;
GUID InterfaceClassGuid;
@@ -64,14 +65,19 @@
*/
DWORD Flags;
- WCHAR SymbolicLink[ANYSIZE_ARRAY]; /* \\?\ACPI#PNP0501#4&2658d0a0&0#{GUID} */
+ /* Contains the symbolic link of this interface, for example
+ * \\?\ACPI#PNP0501#4&2658d0a0&0#{GUID} */
+ WCHAR SymbolicLink[ANYSIZE_ARRAY];
};
/* We don't want to open the .inf file to read only one information in it, so keep a handle to it once it
* has been already loaded once. Keep also a reference counter */
struct InfFileDetails
{
+ /* Handle to the .inf file */
HINF hInf;
+ /* Reference count to this object. Once it raises 0, the .inf file is
+ * automatically closed and this memory structure is deleted */
LONG References;
/* Contains the directory name of the .inf file.
@@ -81,6 +87,7 @@
* Points into szData at then end of the structure */
PCWSTR FileName;
+ /* Variable size array (contains data for DirectoryName and FileName) */
WCHAR szData[ANYSIZE_ARRAY];
};
@@ -105,9 +112,11 @@
struct DeviceInfoElement /* Element of DeviceInfoSet.ListHead */
{
LIST_ENTRY ListEntry;
- DEVINST dnDevInst; /* Used in CM_* functions */
-
- /* Reserved Field points to a struct DriverInfoElement */
+ /* Used when dealing with CM_* functions */
+ DEVINST dnDevInst;
+
+ /* Reserved Field of SP_DEVINSTALL_PARAMS_W structure
+ * points to a struct DriverInfoElement */
SP_DEVINSTALL_PARAMS_W InstallParams;
/* Information about devnode:
@@ -151,23 +160,29 @@
/* Used by SetupDiGetClassInstallParamsW/SetupDiSetClassInstallParamsW */
struct ClassInstallParams ClassInstallParams;
+ /* Variable size array (contains data for DeviceName, UniqueId, DeviceDescription) */
WCHAR Data[ANYSIZE_ARRAY];
};
struct DeviceInfoSet /* HDEVINFO */
{
DWORD magic; /* SETUP_DEV_INFO_SET_MAGIC */
- GUID ClassGuid; /* If != GUID_NULL, only devices of this class can be in the device info set */
- HKEY HKLM; /* Local or distant HKEY_LOCAL_MACHINE registry key */
- HMACHINE hMachine; /* Used in CM_* functions */
+ /* If != GUID_NULL, only devices of this class can be in the device info set */
+ GUID ClassGuid;
+ /* Local or distant HKEY_LOCAL_MACHINE registry key */
+ HKEY HKLM;
+ /* Used when dealing with CM_* functions */
+ HMACHINE hMachine;
/* Reserved Field points to a struct DriverInfoElement */
SP_DEVINSTALL_PARAMS_W InstallParams;
- /* If the driver is not searched/detected, this list is empty */
- LIST_ENTRY DriverListHead; /* List of struct DriverInfoElement */
-
- LIST_ENTRY ListHead; /* List of struct DeviceInfoElement */
+ /* List of struct DriverInfoElement (if no driver has been
+ * searched/detected, this list is empty) */
+ LIST_ENTRY DriverListHead;
+
+ /* List of struct DeviceInfoElement */
+ LIST_ENTRY ListHead;
struct DeviceInfoElement *SelectedDevice;
/* Used by SetupDiGetClassInstallParamsW/SetupDiSetClassInstallParamsW */
@@ -177,6 +192,8 @@
* or NULL if related to local machine. Points into szData field at the
* end of the structure */
PCWSTR MachineName;
+
+ /* Variable size array (contains data for MachineName) */
WCHAR szData[ANYSIZE_ARRAY];
};
@@ -188,6 +205,8 @@
* or NULL if related to local machine. Points into szData field at the
* end of the structure */
PCWSTR MachineName;
+
+ /* Variable size array (contains data for MachineName) */
WCHAR szData[ANYSIZE_ARRAY];
};
Author: gedmurphy
Date: Thu Aug 3 00:00:45 2006
New Revision: 23420
URL: http://svn.reactos.org/svn/reactos?rev=23420&view=rev
Log:
remove wine file. This should now be defined in our psdk
Removed:
trunk/reactos/include/reactos/wine/richedit.h
Removed: trunk/reactos/include/reactos/wine/richedit.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/wine/riche…
==============================================================================
--- trunk/reactos/include/reactos/wine/richedit.h (original)
+++ trunk/reactos/include/reactos/wine/richedit.h (removed)
@@ -1,52 +1,0 @@
-/*
- * Copyright (C) 2000 Jean-Claude Batista
- * Copyright (C) 2002 Andriy Palamarchuk
- *
- * This library is free software; you can redistribute it and/or
- * modify it under the terms of the GNU Lesser General Public
- * License as published by the Free Software Foundation; either
- * version 2.1 of the License, or (at your option) any later version.
- *
- * This library is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this library; if not, write to the Free Software
- * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- */
-
-#include_next <richedit.h>
-
-#ifndef __WINE_RICHEDIT_H
-#define __WINE_RICHEDIT_H
-
-#include "pshpack4.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifndef _RICHEDIT_VER
-#define _RICHEDIT_VER 0x0210
-#endif /* _RICHEDIT_VER */
-
-#define cchTextLimitDefault 0x7fff
-
-#define RICHEDIT_CLASS20A "RichEdit20A"
-#if defined(__GNUC__)
-# define RICHEDIT_CLASS20W (const WCHAR []){ 'R','i','c','h','E','d','i','t','2','0','W',0 }
-#elif defined(_MSC_VER)
-# define RICHEDIT_CLASS20W L"RichEdit20W"
-#else
-static const WCHAR RICHEDIT_CLASS20W[] = { 'R','i','c','h','E','d','i','t','2','0','W',0 };
-#endif
-#define RICHEDIT_CLASS10A "RICHEDIT"
-
-#ifdef __cplusplus
-}
-#endif
-
-#include "poppack.h"
-#endif /* __WINE_RICHEDIT_H */