ReactOS  0.4.14-dev-49-gfb4591c
devclass.c File Reference
#include "setupapi_private.h"
#include <wingdi.h>
#include <shellapi.h>
#include <strsafe.h>
Include dependency graph for devclass.c:

Go to the source code of this file.

Classes

struct  _INSTALL_PARAMS_DATA
 
struct  ClassDevPropertySheetsData
 

Macros

#define ADD_PARAM_HANDLER(Function, UpdateHandler, ParamsType, ParamsField)   { Function, UpdateHandler, sizeof(ParamsType), FIELD_OFFSET(struct ClassInstallParams, ParamsField) },
 
#define UNKNOWN_ICON_INDEX   18
 

Typedefs

typedef BOOL(WINAPIPROPERTY_PAGE_PROVIDER) (IN PSP_PROPSHEETPAGE_REQUEST PropPageRequest, IN LPFNADDPROPSHEETPAGE fAddFunc, IN LPARAM lParam)
 
typedef BOOL(* UPDATE_CLASS_PARAM_HANDLER) (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize)
 
typedef struct _INSTALL_PARAMS_DATA INSTALL_PARAMS_DATA
 

Functions

static BOOL SETUP_PropertyChangeHandler (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize)
 
static BOOL SETUP_PropertyAddPropertyAdvancedHandler (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize)
 
BOOL WINAPI SetupDiDestroyClassImageList (IN PSP_CLASSIMAGELIST_DATA ClassImageListData)
 
static LONG SETUP_CreateDevicesListFromEnumerator (IN OUT struct DeviceInfoSet *list, IN CONST GUID *pClassGuid OPTIONAL, IN LPCWSTR Enumerator, IN HKEY hEnumeratorKey)
 
LONG SETUP_CreateDevicesList (IN OUT struct DeviceInfoSet *list, IN PCWSTR MachineName OPTIONAL, IN CONST GUID *Class OPTIONAL, IN PCWSTR Enumerator OPTIONAL)
 
static BOOL SETUP_GetIconIndex (IN HKEY hClassKey, OUT PINT ImageIndex)
 
BOOL WINAPI SetupDiGetClassImageIndex (IN PSP_CLASSIMAGELIST_DATA ClassImageListData, IN CONST GUID *ClassGuid, OUT PINT ImageIndex)
 
BOOL WINAPI SetupDiGetClassImageList (OUT PSP_CLASSIMAGELIST_DATA ClassImageListData)
 
BOOL WINAPI SetupDiGetClassImageListExA (OUT PSP_CLASSIMAGELIST_DATA ClassImageListData, IN PCSTR MachineName OPTIONAL, IN PVOID Reserved)
 
static BOOL WINAPI SETUP_GetClassIconInfo (IN CONST GUID *ClassGuid, OUT PINT OutIndex, OUT LPWSTR *OutDllName)
 
BOOL WINAPI SetupDiGetClassImageListExW (OUT PSP_CLASSIMAGELIST_DATA ClassImageListData, IN PCWSTR MachineName OPTIONAL, IN PVOID Reserved)
 
BOOL WINAPI SetupDiGetClassInstallParamsA (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize, OUT PDWORD RequiredSize OPTIONAL)
 
BOOL WINAPI SetupDiGetClassInstallParamsW (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize, OUT PDWORD RequiredSize OPTIONAL)
 
BOOL WINAPI SetupDiLoadClassIcon (IN CONST GUID *ClassGuid, OUT HICON *LargeIcon OPTIONAL, OUT PINT MiniIconIndex OPTIONAL)
 
HKEY SETUP_CreateClassKey (HINF hInf)
 
BOOL WINAPI SetupDiInstallClassExW (IN HWND hwndParent OPTIONAL, IN PCWSTR InfFileName OPTIONAL, IN DWORD Flags, IN HSPFILEQ FileQueue OPTIONAL, IN CONST GUID *InterfaceClassGuid OPTIONAL, IN PVOID Reserved1, IN PVOID Reserved2)
 
BOOL WINAPI SetupDiSetClassInstallParamsW (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_CLASSINSTALL_HEADER ClassInstallParams OPTIONAL, IN DWORD ClassInstallParamsSize)
 
BOOL WINAPI SetupDiGetClassDevPropertySheetsA (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN LPPROPSHEETHEADERA PropertySheetHeader, IN DWORD PropertySheetHeaderPageListSize, OUT PDWORD RequiredSize OPTIONAL, IN DWORD PropertySheetType)
 
static BOOL WINAPI SETUP_GetClassDevPropertySheetsCallback (IN HPROPSHEETPAGE hPropSheetPage, IN OUT LPARAM lParam)
 
static DWORD SETUP_GetValueString (IN HKEY hKey, IN LPWSTR lpValueName, OUT LPWSTR *lpString)
 
static BOOL SETUP_CallInstaller (IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_ADDPROPERTYPAGE_DATA PageData)
 
BOOL WINAPI SetupDiGetClassDevPropertySheetsW (IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT LPPROPSHEETHEADERW PropertySheetHeader, IN DWORD PropertySheetHeaderPageListSize, OUT PDWORD RequiredSize OPTIONAL, IN DWORD PropertySheetType)
 

Variables

static const WCHAR BackSlash [] = {'\\',0}
 
static const WCHAR ClassGUID [] = {'C','l','a','s','s','G','U','I','D',0}
 
static const WCHAR ClassInstall32 [] = {'C','l','a','s','s','I','n','s','t','a','l','l','3','2',0}
 
static const WCHAR DotServices [] = {'.','S','e','r','v','i','c','e','s',0}
 
static const WCHAR InterfaceInstall32 [] = {'I','n','t','e','r','f','a','c','e','I','n','s','t','a','l','l','3','2',0}
 
static const WCHAR SetupapiDll [] = {'s','e','t','u','p','a','p','i','.','d','l','l',0}
 
static const INSTALL_PARAMS_DATA InstallParamsData []
 

Macro Definition Documentation

◆ ADD_PARAM_HANDLER

#define ADD_PARAM_HANDLER (   Function,
  UpdateHandler,
  ParamsType,
  ParamsField 
)    { Function, UpdateHandler, sizeof(ParamsType), FIELD_OFFSET(struct ClassInstallParams, ParamsField) },

Definition at line 70 of file devclass.c.

◆ UNKNOWN_ICON_INDEX

#define UNKNOWN_ICON_INDEX   18

Definition at line 79 of file devclass.c.

Typedef Documentation

◆ INSTALL_PARAMS_DATA

◆ PROPERTY_PAGE_PROVIDER

typedef BOOL(WINAPI* PROPERTY_PAGE_PROVIDER) (IN PSP_PROPSHEETPAGE_REQUEST PropPageRequest, IN LPFNADDPROPSHEETPAGE fAddFunc, IN LPARAM lParam)

Definition at line 37 of file devclass.c.

◆ UPDATE_CLASS_PARAM_HANDLER

Function Documentation

◆ SETUP_CallInstaller()

static BOOL SETUP_CallInstaller ( IN DI_FUNCTION  InstallFunction,
IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
IN PSP_ADDPROPERTYPAGE_DATA  PageData 
)
static

Definition at line 1269 of file devclass.c.

1274 {
1275  PSP_CLASSINSTALL_HEADER pClassInstallParams = NULL;
1276  DWORD dwSize = 0;
1277  DWORD dwError;
1278  BOOL ret = TRUE;
1279 
1280  /* Get the size of the old class install parameters */
1283  NULL,
1284  0,
1285  &dwSize))
1286  {
1287  dwError = GetLastError();
1288  if (dwError != ERROR_INSUFFICIENT_BUFFER)
1289  {
1290  ERR("SetupDiGetClassInstallParams failed (Error %lu)\n", dwError);
1291  return FALSE;
1292  }
1293  }
1294 
1295  /* Allocate a buffer for the old class install parameters */
1296  pClassInstallParams = HeapAlloc(GetProcessHeap(), 0, dwSize);
1297  if (pClassInstallParams == NULL)
1298  {
1299  ERR("Failed to allocate the parameters buffer!\n");
1300  return FALSE;
1301  }
1302 
1303  /* Save the old class install parameters */
1306  pClassInstallParams,
1307  dwSize,
1308  &dwSize))
1309  {
1310  ERR("SetupDiGetClassInstallParams failed (Error %lu)\n", GetLastError());
1311  ret = FALSE;
1312  goto done;
1313  }
1314 
1315  /* Set the new class install parameters */
1318  &PageData->ClassInstallHeader,
1319  sizeof(SP_ADDPROPERTYPAGE_DATA)))
1320  {
1321  ERR("SetupDiSetClassInstallParams failed (Error %lu)\n", dwError);
1322  ret = FALSE;
1323  goto done;
1324  }
1325 
1326  /* Call the installer */
1327  ret = SetupDiCallClassInstaller(InstallFunction,
1328  DeviceInfoSet,
1329  DeviceInfoData);
1330  if (ret == FALSE)
1331  {
1332  ERR("SetupDiCallClassInstaller failed\n");
1333  goto done;
1334  }
1335 
1336  /* Read the new class installer parameters */
1339  &PageData->ClassInstallHeader,
1340  sizeof(SP_ADDPROPERTYPAGE_DATA),
1341  NULL))
1342  {
1343  ERR("SetupDiGetClassInstallParams failed (Error %lu)\n", GetLastError());
1344  ret = FALSE;
1345  goto done;
1346  }
1347 
1348 done:
1349  /* Restore and free the old class install parameters */
1350  if (pClassInstallParams != NULL)
1351  {
1354  pClassInstallParams,
1355  dwSize);
1356 
1357  HeapFree(GetProcessHeap(), 0, pClassInstallParams);
1358  }
1359 
1360  return ret;
1361 }
#define TRUE
Definition: types.h:120
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION InstallFunction, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData)
Definition: devinst.c:4029
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
#define SetupDiGetClassInstallParams
Definition: setupapi.h:2591
#define ERR(fmt,...)
Definition: debug.h:109
#define SetupDiSetClassInstallParams
Definition: setupapi.h:2612
#define HeapFree(x, y, z)
Definition: compat.h:394
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by SetupDiGetClassDevPropertySheetsW().

◆ SETUP_CreateClassKey()

HKEY SETUP_CreateClassKey ( HINF  hInf)

Definition at line 3523 of file devinst.c.

3524 {
3525  WCHAR FullBuffer[MAX_PATH];
3528  HKEY hClassKey;
3530 
3531  /* Obtain the Class GUID for this class */
3532  if (!SetupGetLineTextW(NULL,
3533  hInf,
3534  Version,
3536  Buffer,
3537  sizeof(Buffer) / sizeof(WCHAR),
3538  &RequiredSize))
3539  {
3540  return INVALID_HANDLE_VALUE;
3541  }
3542 
3543  /* Build the corresponding registry key name */
3544  lstrcpyW(FullBuffer, REGSTR_PATH_CLASS_NT);
3545  lstrcatW(FullBuffer, BackSlash);
3546  lstrcatW(FullBuffer, Buffer);
3547 
3548  /* Obtain the Class name for this class */
3549  if (!SetupGetLineTextW(NULL,
3550  hInf,
3551  Version,
3553  Buffer,
3554  sizeof(Buffer) / sizeof(WCHAR),
3555  &RequiredSize))
3556  {
3557  return INVALID_HANDLE_VALUE;
3558  }
3559 
3560  /* Try to open or create the registry key */
3561  TRACE("Opening class key %s\n", debugstr_w(FullBuffer));
3562 #if 0 // I keep this for reference...
3564  FullBuffer,
3565  0,
3566  KEY_SET_VALUE,
3567  &hClassKey))
3568  {
3569  /* Use RegCreateKeyExW */
3570  }
3571 #endif
3573  FullBuffer,
3574  0,
3575  NULL,
3577  KEY_SET_VALUE,
3578  NULL,
3579  &hClassKey,
3580  &Disposition))
3581  {
3582  ERR("RegCreateKeyExW(%s) failed\n", debugstr_w(FullBuffer));
3583  return INVALID_HANDLE_VALUE;
3584  }
3586  TRACE("The class key %s was successfully created\n", debugstr_w(FullBuffer));
3587  else
3588  TRACE("The class key %s was successfully opened\n", debugstr_w(FullBuffer));
3589 
3590  TRACE( "setting value %s to %s\n", debugstr_w(REGSTR_VAL_CLASS), debugstr_w(Buffer) );
3593  0,
3594  REG_SZ,
3595  (LPBYTE)Buffer,
3596  RequiredSize * sizeof(WCHAR)))
3597  {
3600  FullBuffer);
3601  return INVALID_HANDLE_VALUE;
3602  }
3603 
3604  return hClassKey;
3605 }
#define REGSTR_VAL_CLASS
Definition: regstr.h:291
IN PVOID IN PVOID IN USHORT Version
Definition: pci.h:359
#define KEY_SET_VALUE
Definition: nt_native.h:1017
LONG WINAPI RegDeleteKeyW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey)
Definition: reg.c:1237
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
_In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Reserved_ ULONG _In_opt_ PUNICODE_STRING _In_ ULONG _Out_opt_ PULONG Disposition
Definition: cmfuncs.h:50
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1091
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
HKEY hClassKey
Definition: umpnpmgr.c:45
Definition: bufpool.h:45
#define REG_CREATED_NEW_KEY
Definition: nt_native.h:1084
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4895
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
#define REGSTR_VAL_CLASSGUID
Definition: regstr.h:422
#define ERR(fmt,...)
Definition: debug.h:109
#define lstrcpyW
Definition: compat.h:406
static const WCHAR BackSlash[]
Definition: devinst.c:25
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define REGSTR_PATH_CLASS_NT
Definition: regstr.h:479
BOOL WINAPI SetupGetLineTextW(PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required)
Definition: parser.c:1756
#define REG_SZ
Definition: layer.c:22

Referenced by SetupDiInstallClassExW().

◆ SETUP_CreateDevicesList()

LONG SETUP_CreateDevicesList ( IN OUT struct DeviceInfoSet list,
IN PCWSTR MachineName  OPTIONAL,
IN CONST GUID *Class  OPTIONAL,
IN PCWSTR Enumerator  OPTIONAL 
)

Definition at line 254 of file devclass.c.

259 {
261  HKEY hEnumKey = NULL;
262  HKEY hEnumeratorKey = NULL;
263  WCHAR KeyBuffer[MAX_PATH];
264  DWORD i;
265  DWORD dwLength;
266  DWORD rc;
267 
268  if (Class && IsEqualIID(Class, &GUID_NULL))
269  Class = NULL;
270 
271  /* Open Enum key (if applicable) */
272  if (MachineName != NULL)
273  {
275  if (rc != ERROR_SUCCESS)
276  goto cleanup;
277  }
278 
279  rc = RegOpenKeyExW(
280  HKLM,
282  0,
284  &hEnumKey);
285  if (rc != ERROR_SUCCESS)
286  goto cleanup;
287 
288  /* If enumerator is provided, call directly SETUP_CreateDevicesListFromEnumerator.
289  * Else, enumerate all enumerators and call SETUP_CreateDevicesListFromEnumerator
290  * for each one.
291  */
292  if (Enumerator)
293  {
294  rc = RegOpenKeyExW(
295  hEnumKey,
296  Enumerator,
297  0,
299  &hEnumeratorKey);
300  if (rc != ERROR_SUCCESS)
301  {
302  if (rc == ERROR_FILE_NOT_FOUND)
303  rc = ERROR_INVALID_DATA;
304  goto cleanup;
305  }
306  rc = SETUP_CreateDevicesListFromEnumerator(list, Class, Enumerator, hEnumeratorKey);
307  }
308  else
309  {
310  /* Enumerate enumerators */
311  i = 0;
312  while (TRUE)
313  {
314  dwLength = sizeof(KeyBuffer) / sizeof(KeyBuffer[0]);
315  rc = RegEnumKeyExW(hEnumKey, i, KeyBuffer, &dwLength, NULL, NULL, NULL, NULL);
316  if (rc == ERROR_NO_MORE_ITEMS)
317  break;
318  else if (rc != ERROR_SUCCESS)
319  goto cleanup;
320  i++;
321 
322  /* Open sub key */
323  if (hEnumeratorKey != NULL)
324  RegCloseKey(hEnumeratorKey);
325  rc = RegOpenKeyExW(hEnumKey, KeyBuffer, 0, KEY_ENUMERATE_SUB_KEYS, &hEnumeratorKey);
326  if (rc != ERROR_SUCCESS)
327  goto cleanup;
328 
329  /* Call SETUP_CreateDevicesListFromEnumerator */
330  rc = SETUP_CreateDevicesListFromEnumerator(list, Class, KeyBuffer, hEnumeratorKey);
331  if (rc != ERROR_SUCCESS)
332  goto cleanup;
333  }
334  rc = ERROR_SUCCESS;
335  }
336 
337 cleanup:
338  if (HKLM != HKEY_LOCAL_MACHINE)
339  RegCloseKey(HKLM);
340  if (hEnumKey != NULL)
342  if (hEnumeratorKey != NULL)
343  RegCloseKey(hEnumeratorKey);
344  return rc;
345 }
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:95
#define REGSTR_PATH_SYSTEMENUM
Definition: regstr.h:483
_In_ DWORD _Out_ PDWORD _In_opt_ PCSTR MachineName
Definition: setupapi.h:1286
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
LONG WINAPI RegConnectRegistryW(LPCWSTR lpMachineName, HKEY hKey, PHKEY phkResult)
Definition: reg.c:869
smooth NULL
Definition: ftsmooth.c:416
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
static const WCHAR HKLM[]
Definition: reginf.c:58
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:83
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
HKEY hEnumKey
Definition: umpnpmgr.c:44
#define GUID_NULL
Definition: ks.h:106
Definition: _list.h:228
#define ERROR_INVALID_DATA
Definition: winerror.h:116
static LONG SETUP_CreateDevicesListFromEnumerator(IN OUT struct DeviceInfoSet *list, IN CONST GUID *pClassGuid OPTIONAL, IN LPCWSTR Enumerator, IN HKEY hEnumeratorKey)
Definition: devclass.c:134
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
char * cleanup(char *str)
Definition: wpickclick.c:99
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2527
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019

Referenced by SetupDiGetClassDevsExW().

◆ SETUP_CreateDevicesListFromEnumerator()

static LONG SETUP_CreateDevicesListFromEnumerator ( IN OUT struct DeviceInfoSet list,
IN CONST GUID *pClassGuid  OPTIONAL,
IN LPCWSTR  Enumerator,
IN HKEY  hEnumeratorKey 
)
static

Definition at line 134 of file devclass.c.

139 {
140  HKEY hDeviceIdKey = NULL, hInstanceIdKey;
141  WCHAR KeyBuffer[MAX_PATH];
142  WCHAR InstancePath[MAX_PATH];
143  LPWSTR pEndOfInstancePath; /* Pointer into InstancePath buffer */
144  struct DeviceInfo *deviceInfo;
145  DWORD i = 0, j;
146  DWORD dwLength, dwRegType;
147  DWORD rc;
148 
149  /* Enumerate device IDs (subkeys of hEnumeratorKey) */
150  while (TRUE)
151  {
152  dwLength = sizeof(KeyBuffer) / sizeof(KeyBuffer[0]);
153  rc = RegEnumKeyExW(hEnumeratorKey, i, KeyBuffer, &dwLength, NULL, NULL, NULL, NULL);
154  if (rc == ERROR_NO_MORE_ITEMS)
155  break;
156  if (rc != ERROR_SUCCESS)
157  goto cleanup;
158  i++;
159 
160  /* Open device id sub key */
161  if (hDeviceIdKey != NULL)
162  RegCloseKey(hDeviceIdKey);
163  rc = RegOpenKeyExW(hEnumeratorKey, KeyBuffer, 0, KEY_ENUMERATE_SUB_KEYS, &hDeviceIdKey);
164  if (rc != ERROR_SUCCESS)
165  goto cleanup;
166 
167  if (FAILED(StringCchCopyW(InstancePath, _countof(InstancePath), Enumerator)) ||
168  FAILED(StringCchCatW(InstancePath, _countof(InstancePath), BackSlash)) ||
169  FAILED(StringCchCatW(InstancePath, _countof(InstancePath), KeyBuffer)) ||
170  FAILED(StringCchCatW(InstancePath, _countof(InstancePath), BackSlash)))
171  {
172  rc = ERROR_GEN_FAILURE;
173  goto cleanup;
174  }
175 
176  pEndOfInstancePath = &InstancePath[strlenW(InstancePath)];
177 
178  /* Enumerate instance IDs (subkeys of hDeviceIdKey) */
179  j = 0;
180  while (TRUE)
181  {
182  GUID KeyGuid;
183 
184  dwLength = sizeof(KeyBuffer) / sizeof(KeyBuffer[0]);
185  rc = RegEnumKeyExW(hDeviceIdKey, j, KeyBuffer, &dwLength, NULL, NULL, NULL, NULL);
186  if (rc == ERROR_NO_MORE_ITEMS)
187  break;
188  if (rc != ERROR_SUCCESS)
189  goto cleanup;
190  j++;
191 
192  /* Open instance id sub key */
193  rc = RegOpenKeyExW(hDeviceIdKey, KeyBuffer, 0, KEY_QUERY_VALUE, &hInstanceIdKey);
194  if (rc != ERROR_SUCCESS)
195  goto cleanup;
196  *pEndOfInstancePath = '\0';
197  strcatW(InstancePath, KeyBuffer);
198 
199  /* Read ClassGUID value */
200  dwLength = sizeof(KeyBuffer) - sizeof(WCHAR);
201  rc = RegQueryValueExW(hInstanceIdKey, ClassGUID, NULL, &dwRegType, (LPBYTE)KeyBuffer, &dwLength);
202  RegCloseKey(hInstanceIdKey);
203  if (rc == ERROR_FILE_NOT_FOUND)
204  {
205  if (pClassGuid)
206  /* Skip this bad entry as we can't verify it */
207  continue;
208  /* Set a default GUID for this device */
209  memcpy(&KeyGuid, &GUID_NULL, sizeof(GUID));
210  }
211  else if (rc != ERROR_SUCCESS)
212  {
213  goto cleanup;
214  }
215  else if (dwRegType != REG_SZ || dwLength < MAX_GUID_STRING_LEN * sizeof(WCHAR))
216  {
217  rc = ERROR_GEN_FAILURE;
218  goto cleanup;
219  }
220  else
221  {
222  KeyBuffer[MAX_GUID_STRING_LEN - 2] = '\0'; /* Replace the } by a NULL character */
223  if (UuidFromStringW(&KeyBuffer[1], &KeyGuid) != RPC_S_OK)
224  /* Bad GUID, skip the entry */
225  continue;
226  }
227 
228  if (pClassGuid && !IsEqualIID(&KeyGuid, pClassGuid))
229  {
230  /* Skip this entry as it is not the right device class */
231  continue;
232  }
233 
234  /* Add the entry to the list */
235  if (!CreateDeviceInfo(list, InstancePath, &KeyGuid, &deviceInfo))
236  {
237  rc = GetLastError();
238  goto cleanup;
239  }
240  TRACE("Adding '%s' to device info set %p\n", debugstr_w(InstancePath), list);
241  InsertTailList(&list->ListHead, &deviceInfo->ListEntry);
242  }
243  }
244 
245  rc = ERROR_SUCCESS;
246 
247 cleanup:
248  if (hDeviceIdKey != NULL)
249  RegCloseKey(hDeviceIdKey);
250  return rc;
251 }
#define TRUE
Definition: types.h:120
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NO_MORE_ITEMS
Definition: compat.h:95
#define _countof(array)
Definition: fontsub.cpp:30
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define InsertTailList(ListHead, Entry)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
BOOL CreateDeviceInfo(IN struct DeviceInfoSet *list, IN LPCWSTR InstancePath, IN LPCGUID pClassGuid, OUT struct DeviceInfo **pDeviceInfo)
Definition: devinst.c:526
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
RPC_STATUS WINAPI UuidFromStringW(RPC_WSTR s, UUID *uuid)
Definition: rpcrt4_main.c:615
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
static const WCHAR ClassGUID[]
Definition: devclass.c:30
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
#define TRACE(s)
Definition: solgame.cpp:4
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:83
#define MAX_GUID_STRING_LEN
Definition: apphelp.c:29
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define GUID_NULL
Definition: ks.h:106
Definition: _list.h:228
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
WINE_UNICODE_INLINE WCHAR * strcatW(WCHAR *dst, const WCHAR *src)
Definition: unicode.h:242
LIST_ENTRY ListEntry
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3366
char * cleanup(char *str)
Definition: wpickclick.c:99
LONG WINAPI RegEnumKeyExW(_In_ HKEY hKey, _In_ DWORD dwIndex, _Out_ LPWSTR lpName, _Inout_ LPDWORD lpcbName, _Reserved_ LPDWORD lpReserved, _Out_opt_ LPWSTR lpClass, _Inout_opt_ LPDWORD lpcbClass, _Out_opt_ PFILETIME lpftLastWriteTime)
Definition: reg.c:2527
#define ERROR_GEN_FAILURE
Definition: winerror.h:134
WCHAR * LPWSTR
Definition: xmlstorage.h:184
static const WCHAR BackSlash[]
Definition: devclass.c:29
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define RPC_S_OK
Definition: rpcnterr.h:22
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019
#define REG_SZ
Definition: layer.c:22

Referenced by SETUP_CreateDevicesList().

◆ SETUP_GetClassDevPropertySheetsCallback()

static BOOL WINAPI SETUP_GetClassDevPropertySheetsCallback ( IN HPROPSHEETPAGE  hPropSheetPage,
IN OUT LPARAM  lParam 
)
static

Definition at line 1211 of file devclass.c.

1214 {
1215  struct ClassDevPropertySheetsData *PropPageData;
1216 
1217  PropPageData = (struct ClassDevPropertySheetsData *)lParam;
1218 
1219  PropPageData->NumberOfPages++;
1220 
1221  if (PropPageData->PropertySheetHeader->nPages < PropPageData->PropertySheetHeaderPageListSize)
1222  {
1223  PropPageData->PropertySheetHeader->phpage[PropPageData->PropertySheetHeader->nPages] = hPropSheetPage;
1224  PropPageData->PropertySheetHeader->nPages++;
1225  return TRUE;
1226  }
1227 
1228  return PropPageData->DontCancel;
1229 }
#define TRUE
Definition: types.h:120
LPPROPSHEETHEADERW PropertySheetHeader
Definition: devclass.c:1204
HPROPSHEETPAGE * phpage
Definition: prsht.h:291
LPARAM lParam
Definition: combotst.c:139

Referenced by SetupDiGetClassDevPropertySheetsW().

◆ SETUP_GetClassIconInfo()

static BOOL WINAPI SETUP_GetClassIconInfo ( IN CONST GUID ClassGuid,
OUT PINT  OutIndex,
OUT LPWSTR OutDllName 
)
static

Definition at line 474 of file devclass.c.

475 {
476  LPWSTR Buffer = NULL;
477  INT iconIndex = -UNKNOWN_ICON_INDEX;
478  HKEY hKey = INVALID_HANDLE_VALUE;
479  BOOL ret = FALSE;
480 
481  if (ClassGuid)
482  {
483  hKey = SetupDiOpenClassRegKey(ClassGuid, KEY_QUERY_VALUE);
484  if (hKey != INVALID_HANDLE_VALUE)
485  {
486  SETUP_GetIconIndex(hKey, &iconIndex);
487  }
488  }
489 
490  if (iconIndex > 0)
491  {
492  /* Look up icon in dll specified by Installer32 or EnumPropPages32 key */
493  PWCHAR Comma;
494  LONG rc;
495  DWORD dwRegType, dwLength;
496  rc = RegQueryValueExW(hKey, REGSTR_VAL_INSTALLER_32, NULL, &dwRegType, NULL, &dwLength);
497  if (rc == ERROR_SUCCESS && dwRegType == REG_SZ)
498  {
499  Buffer = MyMalloc(dwLength + sizeof(WCHAR));
500  if (Buffer == NULL)
501  {
503  goto cleanup;
504  }
506  if (rc != ERROR_SUCCESS)
507  {
508  SetLastError(rc);
509  goto cleanup;
510  }
511  /* make sure the returned buffer is NULL-terminated */
512  Buffer[dwLength / sizeof(WCHAR)] = 0;
513  }
514  else if
516  && dwRegType == REG_SZ)
517  {
518  Buffer = MyMalloc(dwLength + sizeof(WCHAR));
519  if (Buffer == NULL)
520  {
522  goto cleanup;
523  }
525  if (rc != ERROR_SUCCESS)
526  {
527  SetLastError(rc);
528  goto cleanup;
529  }
530  /* make sure the returned buffer is NULL-terminated */
531  Buffer[dwLength / sizeof(WCHAR)] = 0;
532  }
533  else
534  {
535  /* Unable to find where to load the icon */
537  goto cleanup;
538  }
539  Comma = strchrW(Buffer, ',');
540  if (!Comma)
541  {
543  goto cleanup;
544  }
545  *Comma = '\0';
546  *OutDllName = Buffer;
547  }
548  else
549  {
550  /* Look up icon in setupapi.dll */
551  iconIndex = -iconIndex;
552  *OutDllName = NULL;
553  }
554 
555  *OutIndex = iconIndex;
556  ret = TRUE;
557 
558  TRACE("Icon index %d, dll name %s\n", iconIndex, debugstr_w(*OutDllName ? *OutDllName : SetupapiDll));
559 
560 cleanup:
561 
562  if (hKey != INVALID_HANDLE_VALUE)
563  RegCloseKey(hKey);
564 
565  if (Buffer && !ret)
566  MyFree(Buffer);
567 
568  return ret;
569 }
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
WINE_UNICODE_INLINE WCHAR * strchrW(const WCHAR *str, WCHAR ch)
Definition: unicode.h:248
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
uint16_t * PWCHAR
Definition: typedefs.h:54
static BOOL SETUP_GetIconIndex(IN HKEY hClassKey, OUT PINT ImageIndex)
Definition: devclass.c:348
int32_t INT
Definition: typedefs.h:56
#define REGSTR_VAL_ENUMPROPPAGES_32
Definition: regstr.h:490
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
#define debugstr_w
Definition: kernel32.h:32
#define REGSTR_VAL_INSTALLER_32
Definition: regstr.h:487
smooth NULL
Definition: ftsmooth.c:416
Definition: bufpool.h:45
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define TRACE(s)
Definition: solgame.cpp:4
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:83
static const WCHAR SetupapiDll[]
Definition: devclass.c:34
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define UNKNOWN_ICON_INDEX
Definition: devclass.c:79
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
char * cleanup(char *str)
Definition: wpickclick.c:99
LPVOID WINAPI MyMalloc(DWORD dwSize)
Definition: misc.c:147
#define ERROR_GEN_FAILURE
Definition: winerror.h:134
WCHAR * LPWSTR
Definition: xmlstorage.h:184
IN BOOLEAN OUT PSTR Buffer
Definition: progress.h:34
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128
HKEY WINAPI SetupDiOpenClassRegKey(const GUID *ClassGuid, REGSAM samDesired)
Definition: devinst.c:3623
#define REG_SZ
Definition: layer.c:22

Referenced by SetupDiGetClassImageListExW(), and SetupDiLoadClassIcon().

◆ SETUP_GetIconIndex()

static BOOL SETUP_GetIconIndex ( IN HKEY  hClassKey,
OUT PINT  ImageIndex 
)
static

Definition at line 348 of file devclass.c.

351 {
352  LPWSTR Buffer = NULL;
353  DWORD dwRegType, dwLength;
354  LONG rc;
355  BOOL ret = FALSE;
356 
357  /* Read icon registry key */
359  if (rc != ERROR_SUCCESS)
360  {
361  SetLastError(rc);
362  goto cleanup;
363  } else if (dwRegType != REG_SZ)
364  {
366  goto cleanup;
367  }
368  Buffer = MyMalloc(dwLength + sizeof(WCHAR));
369  if (!Buffer)
370  {
372  goto cleanup;
373  }
375  if (rc != ERROR_SUCCESS)
376  {
377  SetLastError(rc);
378  goto cleanup;
379  }
380  /* make sure the returned buffer is NULL-terminated */
381  Buffer[dwLength / sizeof(WCHAR)] = 0;
382 
383  /* Transform icon value to a INT */
384  *ImageIndex = atoiW(Buffer);
385  ret = TRUE;
386 
387 cleanup:
388  MyFree(Buffer);
389  return ret;
390 }
#define REGSTR_VAL_INSICON
Definition: regstr.h:488
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
unsigned char * LPBYTE
Definition: typedefs.h:52
unsigned int BOOL
Definition: ntddk_ex.h:94
long LONG
Definition: pedump.c:60
smooth NULL
Definition: ftsmooth.c:416
HKEY hClassKey
Definition: umpnpmgr.c:45
Definition: bufpool.h:45
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:83
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define ERROR_INVALID_INDEX
Definition: winerror.h:894
char * cleanup(char *str)
Definition: wpickclick.c:99
LPVOID WINAPI MyMalloc(DWORD dwSize)
Definition: misc.c:147
WCHAR * LPWSTR
Definition: xmlstorage.h:184
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128
WINE_UNICODE_INLINE int atoiW(const WCHAR *str)
Definition: unicode.h:315
#define REG_SZ
Definition: layer.c:22

Referenced by SETUP_GetClassIconInfo().

◆ SETUP_GetValueString()

static DWORD SETUP_GetValueString ( IN HKEY  hKey,
IN LPWSTR  lpValueName,
OUT LPWSTR lpString 
)
static

Definition at line 1232 of file devclass.c.

1236 {
1237  LPWSTR lpBuffer;
1238  DWORD dwLength = 0;
1239  DWORD dwRegType;
1240  DWORD rc;
1241 
1242  *lpString = NULL;
1243 
1244  RegQueryValueExW(hKey, lpValueName, NULL, &dwRegType, NULL, &dwLength);
1245 
1246  if (dwLength == 0 || dwRegType != REG_SZ)
1247  return ERROR_FILE_NOT_FOUND;
1248 
1249  lpBuffer = HeapAlloc(GetProcessHeap(), 0, dwLength + sizeof(WCHAR));
1250  if (lpBuffer == NULL)
1251  return ERROR_NOT_ENOUGH_MEMORY;
1252 
1253  rc = RegQueryValueExW(hKey, lpValueName, NULL, NULL, (LPBYTE)lpBuffer, &dwLength);
1254  if (rc != ERROR_SUCCESS)
1255  {
1257  return rc;
1258  }
1259 
1260  lpBuffer[dwLength / sizeof(WCHAR)] = UNICODE_NULL;
1261 
1262  *lpString = lpBuffer;
1263 
1264  return ERROR_SUCCESS;
1265 }
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
unsigned char * LPBYTE
Definition: typedefs.h:52
#define UNICODE_NULL
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:173
smooth NULL
Definition: ftsmooth.c:416
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4116
__wchar_t WCHAR
Definition: xmlstorage.h:180
static DWORD DWORD * dwLength
Definition: fusion.c:83
unsigned long DWORD
Definition: ntddk_ex.h:95
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define HeapFree(x, y, z)
Definition: compat.h:394
#define REG_SZ
Definition: layer.c:22

Referenced by SetupDiGetClassDevPropertySheetsW().

◆ SETUP_PropertyAddPropertyAdvancedHandler()

static BOOL SETUP_PropertyAddPropertyAdvancedHandler ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
IN PSP_CLASSINSTALL_HEADER ClassInstallParams  OPTIONAL,
IN DWORD  ClassInstallParamsSize 
)
static

Definition at line 1037 of file devclass.c.

1042 {
1044  BOOL ret = FALSE;
1045 
1048  else if (AddPropertyPageData && AddPropertyPageData->Flags != 0)
1050  else if (AddPropertyPageData && AddPropertyPageData->NumDynamicPages >= MAX_INSTALLWIZARD_DYNAPAGES)
1052  else
1053  {
1054  PSP_ADDPROPERTYPAGE_DATA *CurrentAddPropertyPageData;
1055  if (!DeviceInfoData)
1056  {
1057  struct DeviceInfoSet *list = (struct DeviceInfoSet *)DeviceInfoSet;
1058  CurrentAddPropertyPageData = &list->ClassInstallParams.AddPropertyPageData;
1059  }
1060  else
1061  {
1062  struct DeviceInfo *deviceInfo = (struct DeviceInfo *)DeviceInfoData->Reserved;
1063  CurrentAddPropertyPageData = &deviceInfo->ClassInstallParams.AddPropertyPageData;
1064  }
1065  if (*CurrentAddPropertyPageData)
1066  {
1067  MyFree(*CurrentAddPropertyPageData);
1068  *CurrentAddPropertyPageData = NULL;
1069  }
1070  if (AddPropertyPageData)
1071  {
1072  *CurrentAddPropertyPageData = MyMalloc(ClassInstallParamsSize);
1073  if (!*CurrentAddPropertyPageData)
1074  {
1076  goto done;
1077  }
1078  memcpy(*CurrentAddPropertyPageData, AddPropertyPageData, ClassInstallParamsSize);
1079  }
1080  ret = TRUE;
1081  }
1082 
1083 done:
1084  return ret;
1085 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define TRUE
Definition: types.h:120
#define MAX_INSTALLWIZARD_DYNAPAGES
Definition: setupapi.h:454
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
ULONG_PTR Reserved
Definition: setupapi.h:833
_In_opt_ PSP_DEVINFO_DATA _In_ DWORD ClassInstallParamsSize
Definition: setupapi.h:1525
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523
#define SetLastError(x)
Definition: compat.h:409
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
Definition: _list.h:228
SP_NEWDEVICEWIZARD_DATA * PSP_ADDPROPERTYPAGE_DATA
Definition: setupapi.h:977
LPVOID WINAPI MyMalloc(DWORD dwSize)
Definition: misc.c:147
struct ClassInstallParams ClassInstallParams
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583

◆ SETUP_PropertyChangeHandler()

static BOOL SETUP_PropertyChangeHandler ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
IN PSP_CLASSINSTALL_HEADER ClassInstallParams  OPTIONAL,
IN DWORD  ClassInstallParamsSize 
)
static

Definition at line 984 of file devclass.c.

989 {
991  BOOL ret = FALSE;
992 
993  if (!DeviceInfoData)
995  else if (ClassInstallParamsSize != sizeof(SP_PROPCHANGE_PARAMS))
997  else if (PropChangeParams && PropChangeParams->StateChange != DICS_ENABLE
998  && PropChangeParams->StateChange != DICS_DISABLE && PropChangeParams->StateChange != DICS_PROPCHANGE
999  && PropChangeParams->StateChange != DICS_START && PropChangeParams->StateChange != DICS_STOP)
1001  else if (PropChangeParams && PropChangeParams->Scope != DICS_FLAG_GLOBAL
1002  && PropChangeParams->Scope != DICS_FLAG_CONFIGSPECIFIC)
1004  else if (PropChangeParams
1005  && (PropChangeParams->StateChange == DICS_START || PropChangeParams->StateChange == DICS_STOP)
1006  && PropChangeParams->Scope != DICS_FLAG_CONFIGSPECIFIC)
1008  else
1009  {
1010  PSP_PROPCHANGE_PARAMS *CurrentPropChangeParams;
1011  struct DeviceInfo *deviceInfo = (struct DeviceInfo *)DeviceInfoData->Reserved;
1012  CurrentPropChangeParams = &deviceInfo->ClassInstallParams.PropChangeParams;
1013 
1014  if (*CurrentPropChangeParams)
1015  {
1016  MyFree(*CurrentPropChangeParams);
1017  *CurrentPropChangeParams = NULL;
1018  }
1019  if (PropChangeParams)
1020  {
1021  *CurrentPropChangeParams = MyMalloc(ClassInstallParamsSize);
1022  if (!*CurrentPropChangeParams)
1023  {
1025  goto done;
1026  }
1027  memcpy(*CurrentPropChangeParams, PropChangeParams, ClassInstallParamsSize);
1028  }
1029  ret = TRUE;
1030  }
1031 
1032 done:
1033  return ret;
1034 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define TRUE
Definition: types.h:120
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define DICS_ENABLE
Definition: setupapi.h:112
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
unsigned int BOOL
Definition: ntddk_ex.h:94
#define DICS_DISABLE
Definition: setupapi.h:114
smooth NULL
Definition: ftsmooth.c:416
#define DICS_STOP
Definition: setupapi.h:119
#define DICS_START
Definition: setupapi.h:117
ULONG_PTR Reserved
Definition: setupapi.h:833
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define DICS_FLAG_CONFIGSPECIFIC
Definition: setupapi.h:115
_In_opt_ PSP_DEVINFO_DATA _In_ DWORD ClassInstallParamsSize
Definition: setupapi.h:1525
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523
#define SetLastError(x)
Definition: compat.h:409
int ret
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
struct _SP_PROPCHANGE_PARAMS * PSP_PROPCHANGE_PARAMS
#define DICS_FLAG_GLOBAL
Definition: setupapi.h:113
#define DICS_PROPCHANGE
Definition: setupapi.h:116
LPVOID WINAPI MyMalloc(DWORD dwSize)
Definition: misc.c:147
struct ClassInstallParams ClassInstallParams
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583

◆ SetupDiDestroyClassImageList()

BOOL WINAPI SetupDiDestroyClassImageList ( IN PSP_CLASSIMAGELIST_DATA  ClassImageListData)

Definition at line 85 of file devclass.c.

87 {
88  struct ClassImageList *list;
89  BOOL ret = FALSE;
90 
91  TRACE("%p\n", ClassImageListData);
92 
93  if (!ClassImageListData)
95  else if (ClassImageListData->cbSize != sizeof(SP_CLASSIMAGELIST_DATA))
97  else if ((list = (struct ClassImageList *)ClassImageListData->Reserved) == NULL)
99  else if (list->magic != SETUP_CLASS_IMAGE_LIST_MAGIC)
101  else
102  {
103  /* If Reserved wasn't NULL, then this is valid too */
104  if (ClassImageListData->ImageList)
105  {
106  ImageList_Destroy(ClassImageListData->ImageList);
107  ClassImageListData->ImageList = NULL;
108  }
109 
110  MyFree(list);
111  ClassImageListData->Reserved = 0;
112 
113  ret = TRUE;
114  }
115 
116  TRACE("Returning %d\n", ret);
117  return ret;
118 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define TRUE
Definition: types.h:120
#define SETUP_CLASS_IMAGE_LIST_MAGIC
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define SetLastError(x)
Definition: compat.h:409
int ret
Definition: _list.h:228
#define list
Definition: rosglue.h:35
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128

Referenced by HardwareDlgProc(), SetupDiGetClassImageListExW(), and CDeviceView::Uninitialize().

◆ SetupDiGetClassDevPropertySheetsA()

BOOL WINAPI SetupDiGetClassDevPropertySheetsA ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
IN LPPROPSHEETHEADERA  PropertySheetHeader,
IN DWORD  PropertySheetHeaderPageListSize,
OUT PDWORD RequiredSize  OPTIONAL,
IN DWORD  PropertySheetType 
)

Definition at line 1168 of file devclass.c.

1175 {
1176  PROPSHEETHEADERW psh;
1177  BOOL ret = FALSE;
1178 
1179  TRACE("%p %p %p 0%lx %p 0x%lx\n", DeviceInfoSet, DeviceInfoData,
1180  PropertySheetHeader, PropertySheetHeaderPageListSize,
1181  RequiredSize, PropertySheetType);
1182 
1183  if(PropertySheetHeader)
1184  {
1185  psh.dwFlags = PropertySheetHeader->dwFlags;
1186  psh.phpage = PropertySheetHeader->phpage;
1187  psh.nPages = PropertySheetHeader->nPages;
1188  }
1189 
1190  ret = SetupDiGetClassDevPropertySheetsW(DeviceInfoSet, DeviceInfoData, PropertySheetHeader ? &psh : NULL,
1191  PropertySheetHeaderPageListSize, RequiredSize,
1192  PropertySheetType);
1193  if (ret)
1194  {
1195  PropertySheetHeader->nPages = psh.nPages;
1196  }
1197 
1198  TRACE("Returning %d\n", ret);
1199  return ret;
1200 }
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
#define TRACE(s)
Definition: solgame.cpp:4
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523
DWORD dwFlags
Definition: prsht.h:276
int ret
BOOL WINAPI SetupDiGetClassDevPropertySheetsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN OUT LPPROPSHEETHEADERW PropertySheetHeader, IN DWORD PropertySheetHeaderPageListSize, OUT PDWORD RequiredSize OPTIONAL, IN DWORD PropertySheetType)
Definition: devclass.c:1367
HPROPSHEETPAGE * phpage
Definition: prsht.h:291

◆ SetupDiGetClassDevPropertySheetsW()

BOOL WINAPI SetupDiGetClassDevPropertySheetsW ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
IN OUT LPPROPSHEETHEADERW  PropertySheetHeader,
IN DWORD  PropertySheetHeaderPageListSize,
OUT PDWORD RequiredSize  OPTIONAL,
IN DWORD  PropertySheetType 
)

Definition at line 1367 of file devclass.c.

1374 {
1375  struct DeviceInfoSet *devInfoSet = NULL;
1376  struct DeviceInfo *devInfo = NULL;
1377  BOOL ret = FALSE;
1378 
1379  TRACE("%p %p %p 0%lx %p 0x%lx\n", DeviceInfoSet, DeviceInfoData,
1380  PropertySheetHeader, PropertySheetHeaderPageListSize,
1381  RequiredSize, PropertySheetType);
1382 
1383  if (!DeviceInfoSet)
1387  else if ((devInfoSet = (struct DeviceInfoSet *)DeviceInfoSet)->magic != SETUP_DEVICE_INFO_SET_MAGIC)
1389  else if (!PropertySheetHeader)
1391  else if (PropertySheetHeader->dwFlags & PSH_PROPSHEETPAGE)
1393  else if (DeviceInfoData && DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA))
1395  else if (!DeviceInfoData && IsEqualIID(&devInfoSet->ClassGuid, &GUID_NULL))
1397  else if (PropertySheetType != DIGCDP_FLAG_ADVANCED
1398  && PropertySheetType != DIGCDP_FLAG_BASIC
1399  && PropertySheetType != DIGCDP_FLAG_REMOTE_ADVANCED
1400  && PropertySheetType != DIGCDP_FLAG_REMOTE_BASIC)
1402  else
1403  {
1404  HKEY hKey = INVALID_HANDLE_VALUE;
1406  LPWSTR PropPageProvider = NULL;
1407  HMODULE hModule = NULL;
1408  PROPERTY_PAGE_PROVIDER pPropPageProvider = NULL;
1409  struct ClassDevPropertySheetsData PropPageData;
1410  SP_ADDPROPERTYPAGE_DATA InstallerPropPageData;
1411  DWORD InitialNumberOfPages, i;
1412  DWORD rc;
1413 
1414  if (DeviceInfoData)
1415  devInfo = (struct DeviceInfo *)DeviceInfoData->Reserved;
1416 
1417  /* Get the class property page provider */
1418  if (devInfoSet->hmodClassPropPageProvider == NULL)
1419  {
1420  hKey = SetupDiOpenClassRegKeyExW(devInfo ? &devInfo->ClassGuid : &devInfoSet->ClassGuid, KEY_QUERY_VALUE,
1421  DIOCR_INSTALLER, NULL/*devInfoSet->MachineName + 2*/, NULL);
1422  if (hKey != INVALID_HANDLE_VALUE)
1423  {
1424  rc = SETUP_GetValueString(hKey, REGSTR_VAL_ENUMPROPPAGES_32, &PropPageProvider);
1425  if (rc == ERROR_SUCCESS)
1426  {
1427  rc = GetFunctionPointer(PropPageProvider, &hModule, (PVOID*)&pPropPageProvider);
1428  if (rc != ERROR_SUCCESS)
1429  {
1431  goto cleanup;
1432  }
1433 
1434  devInfoSet->hmodClassPropPageProvider = hModule;
1435  devInfoSet->pClassPropPageProvider = pPropPageProvider;
1436 
1437  HeapFree(GetProcessHeap(), 0, PropPageProvider);
1438  PropPageProvider = NULL;
1439  }
1440 
1441  RegCloseKey(hKey);
1442  hKey = INVALID_HANDLE_VALUE;
1443  }
1444  }
1445 
1446  /* Get the device property page provider */
1447  if (devInfo != NULL && devInfo->hmodDevicePropPageProvider == NULL)
1448  {
1449  hKey = SETUPDI_OpenDrvKey(devInfoSet->HKLM, devInfo, KEY_QUERY_VALUE);
1450  if (hKey != INVALID_HANDLE_VALUE)
1451  {
1452  rc = SETUP_GetValueString(hKey, REGSTR_VAL_ENUMPROPPAGES_32, &PropPageProvider);
1453  if (rc == ERROR_SUCCESS)
1454  {
1455  rc = GetFunctionPointer(PropPageProvider, &hModule, (PVOID*)&pPropPageProvider);
1456  if (rc != ERROR_SUCCESS)
1457  {
1459  goto cleanup;
1460  }
1461 
1463  devInfo->pDevicePropPageProvider = pPropPageProvider;
1464 
1465  HeapFree(GetProcessHeap(), 0, PropPageProvider);
1466  PropPageProvider = NULL;
1467  }
1468 
1469  RegCloseKey(hKey);
1470  hKey = INVALID_HANDLE_VALUE;
1471  }
1472  }
1473 
1474  InitialNumberOfPages = PropertySheetHeader->nPages;
1475 
1476  Request.cbSize = sizeof(SP_PROPSHEETPAGE_REQUEST);
1477  Request.PageRequested = SPPSR_ENUM_ADV_DEVICE_PROPERTIES;
1478  Request.DeviceInfoSet = DeviceInfoSet;
1479  Request.DeviceInfoData = DeviceInfoData;
1480 
1481  PropPageData.PropertySheetHeader = PropertySheetHeader;
1482  PropPageData.PropertySheetHeaderPageListSize = PropertySheetHeaderPageListSize;
1483  PropPageData.NumberOfPages = 0;
1484  PropPageData.DontCancel = (RequiredSize != NULL) ? TRUE : FALSE;
1485 
1486  /* Call the class property page provider */
1487  if (devInfoSet->pClassPropPageProvider != NULL)
1489 
1490  /* Call the device property page provider */
1491  if (devInfo != NULL && devInfo->pDevicePropPageProvider != NULL)
1493 
1494  /* Call the class installer and add the returned pages */
1495  ZeroMemory(&InstallerPropPageData, sizeof(SP_ADDPROPERTYPAGE_DATA));
1496  InstallerPropPageData.ClassInstallHeader.cbSize = sizeof(SP_CLASSINSTALL_HEADER);
1497  InstallerPropPageData.ClassInstallHeader.InstallFunction = DIF_ADDPROPERTYPAGE_ADVANCED;
1498  InstallerPropPageData.hwndWizardDlg = PropertySheetHeader->hwndParent;
1499 
1501  DeviceInfoSet,
1503  &InstallerPropPageData))
1504  {
1505  for (i = 0; i < InstallerPropPageData.NumDynamicPages; i++)
1506  {
1507  if (PropPageData.PropertySheetHeader->nPages < PropertySheetHeaderPageListSize)
1508  {
1509  PropPageData.PropertySheetHeader->phpage[PropPageData.PropertySheetHeader->nPages] =
1510  InstallerPropPageData.DynamicPages[i];
1511  PropPageData.PropertySheetHeader->nPages++;
1512  }
1513  }
1514 
1515  PropPageData.NumberOfPages += InstallerPropPageData.NumDynamicPages;
1516  }
1517 
1518  if (RequiredSize)
1519  *RequiredSize = PropPageData.NumberOfPages;
1520 
1521  if (InitialNumberOfPages + PropPageData.NumberOfPages <= PropertySheetHeaderPageListSize)
1522  {
1523  ret = TRUE;
1524  }
1525  else
1526  {
1528  }
1529 
1530 cleanup:
1531  if (hKey != INVALID_HANDLE_VALUE)
1532  RegCloseKey(hKey);
1533 
1534  if (PropPageProvider != NULL)
1535  HeapFree(GetProcessHeap(), 0, PropPageProvider);
1536  }
1537 
1538  TRACE("Returning %d\n", ret);
1539  return ret;
1540 }
static BOOL WINAPI SETUP_GetClassDevPropertySheetsCallback(IN HPROPSHEETPAGE hPropSheetPage, IN OUT LPARAM lParam)
Definition: devclass.c:1211
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define TRUE
Definition: types.h:120
#define ERROR_SUCCESS
Definition: deptool.c:10
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
u32_t magic(void)
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
#define ZeroMemory
Definition: winbase.h:1635
HMODULE hmodClassPropPageProvider
#define ERROR_INVALID_PROPPAGE_PROVIDER
Definition: setupapi.h:327
#define SETUP_DEVICE_INFO_SET_MAGIC
#define DIGCDP_FLAG_ADVANCED
Definition: setupapi.h:165
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
_In_ NDIS_HANDLE _In_ PNDIS_REQUEST Request
Definition: ndis.h:5173
#define REGSTR_VAL_ENUMPROPPAGES_32
Definition: regstr.h:490
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
unsigned int BOOL
Definition: ntddk_ex.h:94
PVOID pClassPropPageProvider
#define DIOCR_INSTALLER
Definition: setupapi.h:176
smooth NULL
Definition: ftsmooth.c:416
#define DIF_ADDPROPERTYPAGE_ADVANCED
Definition: setupapi.h:154
LONG_PTR LPARAM
Definition: windef.h:208
PVOID pDevicePropPageProvider
HMODULE hmodDevicePropPageProvider
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
ULONG_PTR Reserved
Definition: setupapi.h:833
#define TRACE(s)
Definition: solgame.cpp:4
#define GetProcessHeap()
Definition: compat.h:395
if(!(yy_init))
Definition: macro.lex.yy.c:714
DWORD GetFunctionPointer(IN PWSTR InstallerName, OUT HMODULE *ModulePointer, OUT PVOID *FunctionPointer)
Definition: misc.c:44
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
#define GUID_NULL
Definition: ks.h:106
HKEY SETUPDI_OpenDrvKey(HKEY RootKey, struct DeviceInfo *devInfo, REGSAM samDesired)
Definition: devinst.c:5842
#define SPPSR_ENUM_ADV_DEVICE_PROPERTIES
Definition: setupapi.h:610
struct _SP_PROPSHEETPAGE_REQUEST SP_PROPSHEETPAGE_REQUEST
#define PSH_PROPSHEETPAGE
Definition: prsht.h:43
#define KEY_QUERY_VALUE
Definition: nt_native.h:1016
struct _SP_CLASSINSTALL_HEADER SP_CLASSINSTALL_HEADER
static DWORD SETUP_GetValueString(IN HKEY hKey, IN LPWSTR lpValueName, OUT LPWSTR *lpString)
Definition: devclass.c:1232
char * cleanup(char *str)
Definition: wpickclick.c:99
HKEY WINAPI SetupDiOpenClassRegKeyExW(const GUID *ClassGuid, REGSAM samDesired, DWORD Flags, PCWSTR MachineName, PVOID Reserved)
Definition: devinst.c:3667
BOOL(WINAPI * PROPERTY_PAGE_PROVIDER)(IN PSP_PROPSHEETPAGE_REQUEST PropPageRequest, IN LPFNADDPROPSHEETPAGE fAddFunc, IN LPARAM lParam)
Definition: devclass.c:37
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define DIGCDP_FLAG_BASIC
Definition: setupapi.h:164
#define HeapFree(x, y, z)
Definition: compat.h:394
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
static BOOL SETUP_CallInstaller(IN DI_FUNCTION InstallFunction, IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_ADDPROPERTYPAGE_DATA PageData)
Definition: devclass.c:1269
HMODULE hModule
Definition: animate.c:44
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by SetupDiGetClassDevPropertySheetsA().

◆ SetupDiGetClassImageIndex()

BOOL WINAPI SetupDiGetClassImageIndex ( IN PSP_CLASSIMAGELIST_DATA  ClassImageListData,
IN CONST GUID ClassGuid,
OUT PINT  ImageIndex 
)

Definition at line 396 of file devclass.c.

400 {
401  struct ClassImageList *list;
402  BOOL ret = FALSE;
403 
404  TRACE("%p %s %p\n", ClassImageListData, debugstr_guid(ClassGuid), ImageIndex);
405 
406  if (!ClassImageListData || !ClassGuid || !ImageIndex)
408  else if (ClassImageListData->cbSize != sizeof(SP_CLASSIMAGELIST_DATA))
410  else if ((list = (struct ClassImageList *)ClassImageListData->Reserved) == NULL)
412  else if (list->magic != SETUP_CLASS_IMAGE_LIST_MAGIC)
414  else
415  {
416  DWORD i;
417 
418  for (i = 0; i < list->NumberOfGuids; i++)
419  {
420  if (IsEqualIID(ClassGuid, &list->Guids[i]))
421  break;
422  }
423 
424  if (i == list->NumberOfGuids || list->IconIndexes[i] < 0)
426  else
427  {
428  *ImageIndex = list->IconIndexes[i];
429  ret = TRUE;
430  }
431  }
432 
433  TRACE("Returning %d\n", ret);
434  return ret;
435 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define TRUE
Definition: types.h:120
#define SETUP_CLASS_IMAGE_LIST_MAGIC
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
int ret
Definition: _list.h:228
#define list
Definition: rosglue.h:35
static const char * debugstr_guid(const GUID *guid)
Definition: devclass.c:42
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by BuildDevicesList(), EnumDeviceClasses(), InitProbeListPage(), CClassNode::SetupNode(), and CDeviceNode::SetupNode().

◆ SetupDiGetClassImageList()

BOOL WINAPI SetupDiGetClassImageList ( OUT PSP_CLASSIMAGELIST_DATA  ClassImageListData)

Definition at line 441 of file devclass.c.

443 {
444  return SetupDiGetClassImageListExW(ClassImageListData, NULL, NULL);
445 }
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI SetupDiGetClassImageListExW(OUT PSP_CLASSIMAGELIST_DATA ClassImageListData, IN PCWSTR MachineName OPTIONAL, IN PVOID Reserved)
Definition: devclass.c:576

Referenced by DisplayImageList(), HardwareDlgProc(), CDeviceView::Initialize(), and InitProbeListPage().

◆ SetupDiGetClassImageListExA()

BOOL WINAPI SetupDiGetClassImageListExA ( OUT PSP_CLASSIMAGELIST_DATA  ClassImageListData,
IN PCSTR MachineName  OPTIONAL,
IN PVOID  Reserved 
)

Definition at line 451 of file devclass.c.

455 {
456  PWSTR MachineNameW = NULL;
457  BOOL ret;
458 
459  if (MachineName)
460  {
462  if (MachineNameW == NULL)
463  return FALSE;
464  }
465 
466  ret = SetupDiGetClassImageListExW(ClassImageListData, MachineNameW, Reserved);
467 
468  MyFree(MachineNameW);
469 
470  return ret;
471 }
uint16_t * PWSTR
Definition: typedefs.h:54
#define CP_ACP
Definition: compat.h:99
_In_ DWORD _Out_ PDWORD _In_opt_ PCSTR MachineName
Definition: setupapi.h:1286
LPWSTR WINAPI pSetupMultiByteToUnicode(LPCSTR lpMultiByteStr, UINT uCodePage)
Definition: misc.c:281
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
BOOL WINAPI SetupDiGetClassImageListExW(OUT PSP_CLASSIMAGELIST_DATA ClassImageListData, IN PCWSTR MachineName OPTIONAL, IN PVOID Reserved)
Definition: devclass.c:576
int ret
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128

◆ SetupDiGetClassImageListExW()

BOOL WINAPI SetupDiGetClassImageListExW ( OUT PSP_CLASSIMAGELIST_DATA  ClassImageListData,
IN PCWSTR MachineName  OPTIONAL,
IN PVOID  Reserved 
)

Definition at line 576 of file devclass.c.

580 {
581  BOOL ret = FALSE;
582 
583  TRACE("%p %p %p\n", ClassImageListData, debugstr_w(MachineName), Reserved);
584 
585  if (!ClassImageListData)
587  else if (ClassImageListData->cbSize != sizeof(SP_CLASSIMAGELIST_DATA))
589  else if (Reserved)
591  else
592  {
593  struct ClassImageList *list = NULL;
594  HDC hDC;
596  DWORD ilMask, bkColor;
597  HICON hIcon;
598  DWORD size;
599  INT i, bpp;
600  UINT idx;
601 
602  /* Get list of all class GUIDs in given computer */
604  0,
605  NULL,
606  0,
607  &RequiredSize,
608  MachineName,
609  NULL);
611  goto cleanup;
612 
613  size = sizeof(struct ClassImageList)
614  + (sizeof(GUID) + sizeof(INT)) * RequiredSize;
616  if (!list)
617  {
619  goto cleanup;
620  }
622  list->NumberOfGuids = RequiredSize;
623  list->Guids = (GUID*)(list + 1);
624  list->IconIndexes = (INT*)((ULONG_PTR)(list + 1) + sizeof(GUID) * RequiredSize);
625 
627  0,
628  list->Guids,
629  list->NumberOfGuids,
630  &RequiredSize,
631  MachineName,
632  NULL);
633  if (!ret)
634  goto cleanup;
635  else if (RequiredSize != list->NumberOfGuids)
636  {
637  /* Hm. Class list changed since last call. Ignore
638  * this case as it should be very rare */
640  ret = FALSE;
641  goto cleanup;
642  }
643 
644  /* Prepare a HIMAGELIST */
646 
647  hDC = GetDC(NULL);
648  if (!hDC)
649  goto cleanup;
650 
652  ReleaseDC(NULL, hDC);
653 
654  if (bpp <= 4)
655  ilMask = ILC_COLOR4;
656  else if (bpp <= 8)
657  ilMask = ILC_COLOR8;
658  else if (bpp <= 16)
659  ilMask = ILC_COLOR16;
660  else if (bpp <= 24)
661  ilMask = ILC_COLOR24;
662  else if (bpp <= 32)
663  ilMask = ILC_COLOR32;
664  else
665  ilMask = ILC_COLOR;
666 
667  ilMask |= ILC_MASK;
668 
669  ClassImageListData->ImageList = ImageList_Create(16, 16, ilMask, 100, 10);
670  if (!ClassImageListData->ImageList)
671  goto cleanup;
672 
673  ClassImageListData->Reserved = (ULONG_PTR)list;
674 
675  /* For some reason, Windows sets the list background to COLOR_WINDOW */
676  bkColor = GetSysColor(COLOR_WINDOW);
677  ImageList_SetBkColor(ClassImageListData->ImageList, bkColor);
678 
679  /* Now, we "simply" need to load icons associated with all class guids,
680  * and put their index in the image list in the IconIndexes array */
681  for (i = 0; i < list->NumberOfGuids; i++)
682  {
683  INT miniIconIndex;
684  LPWSTR DllName = NULL;
685 
686  if (SETUP_GetClassIconInfo(&list->Guids[i], &miniIconIndex, &DllName))
687  {
688  if (DllName && ExtractIconExW(DllName, -miniIconIndex, NULL, &hIcon, 1) == 1)
689  {
690  list->IconIndexes[i] = ImageList_AddIcon(ClassImageListData->ImageList, hIcon);
691  }
692  else if(!DllName)
693  {
694  hIcon = LoadImage(hInstance, MAKEINTRESOURCE(miniIconIndex), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
695  list->IconIndexes[i] = ImageList_AddIcon(ClassImageListData->ImageList, hIcon);
696  }
697 
698  if(hIcon)
700  else
701  list->IconIndexes[i] = -1;
702 
703  if(DllName)
704  MyFree(DllName);
705  }
706  else
707  {
708  list->IconIndexes[i] = -1; /* Special value to indicate that the icon is unavailable */
709  }
710  }
711 
712  /* Finally, add the overlay icons to the image list */
713  for (i = 0; i <= 2; i++)
714  {
716  if (hIcon)
717  {
718  idx = ImageList_AddIcon(ClassImageListData->ImageList, hIcon);
719  if (idx != -1)
720  ImageList_SetOverlayImage(ClassImageListData->ImageList, idx, i + 1);
722  }
723  }
724 
725  ret = TRUE;
726 
727 cleanup:
728  if (!ret)
729  {
730  if (ClassImageListData->Reserved)
731  SetupDiDestroyClassImageList(ClassImageListData);
732  else if (list)
733  MyFree(list);
734  }
735  }
736 
737  TRACE("Returning %d\n", ret);
738  return ret;
739 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
#define ILC_COLOR16
Definition: commctrl.h:341
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define BITSPIXEL
Definition: wingdi.h:719
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
#define IMAGE_ICON
Definition: winuser.h:212
COLORREF WINAPI ImageList_SetBkColor(HIMAGELIST himl, COLORREF clrBk)
Definition: imagelist.c:2889
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyIcon(_In_ HICON)
Definition: cursoricon.c:2022
static HDC
Definition: imagelist.c:92
#define SETUP_CLASS_IMAGE_LIST_MAGIC
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
static BOOL WINAPI SETUP_GetClassIconInfo(IN CONST GUID *ClassGuid, OUT PINT OutIndex, OUT LPWSTR *OutDllName)
Definition: devclass.c:474
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
_In_ DWORD _Out_ PDWORD _In_opt_ PCSTR MachineName
Definition: setupapi.h:1286
#define COLOR_WINDOW
Definition: winuser.h:908
int32_t INT
Definition: typedefs.h:56
DWORD WINAPI GetSysColor(_In_ int)
#define ILC_COLOR4
Definition: commctrl.h:339
#define ILC_COLOR32
Definition: commctrl.h:343
uint32_t ULONG_PTR
Definition: typedefs.h:63
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
HINSTANCE hInstance
Definition: charmap.c:20
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
unsigned int BOOL
Definition: ntddk_ex.h:94
UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons)
Definition: iconcache.cpp:873
#define debugstr_w
Definition: kernel32.h:32
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
#define ILC_COLOR
Definition: commctrl.h:337
unsigned int idx
Definition: utils.c:41
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI SetupDiDestroyClassImageList(IN PSP_CLASSIMAGELIST_DATA ClassImageListData)
Definition: devclass.c:85
_Reserved_ PVOID Reserved
Definition: winddi.h:3974
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
#define TRACE(s)
Definition: solgame.cpp:4
GLsizeiptr size
Definition: glext.h:5919
#define GetProcessHeap()
Definition: compat.h:395
PVOID WINAPI HeapAlloc(HANDLE, DWORD, SIZE_T)
#define ILC_COLOR24
Definition: commctrl.h:342
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
INT WINAPI ImageList_AddIcon(HIMAGELIST himl, HICON hIcon)
Definition: imagelist.c:540
int ret
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define ILC_MASK
Definition: commctrl.h:336
Definition: _list.h:228
static HDC hDC
Definition: 3dtext.c:33
BOOL WINAPI ImageList_SetOverlayImage(HIMAGELIST himl, INT iImage, INT iOverlay)
Definition: imagelist.c:3180
HICON hIcon
Definition: msconfig.c:44
BOOL WINAPI SetupDiBuildClassInfoListExW(DWORD Flags, LPGUID ClassGuidList, DWORD ClassGuidListSize, PDWORD RequiredSize, LPCWSTR MachineName, PVOID Reserved)
Definition: devinst.c:720
unsigned int UINT
Definition: ndis.h:50
#define ILC_COLOR8
Definition: commctrl.h:340
#define ULONG_PTR
Definition: config.h:101
char * cleanup(char *str)
Definition: wpickclick.c:99
DWORD bpp
Definition: surface.c:181
#define LoadImage
Definition: winuser.h:5716
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
#define ERROR_GEN_FAILURE
Definition: winerror.h:134
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define LR_DEFAULTCOLOR
Definition: winuser.h:1077
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128
#define ERROR_INSUFFICIENT_BUFFER
Definition: dderror.h:10

Referenced by SetupDiGetClassImageList(), and SetupDiGetClassImageListExA().

◆ SetupDiGetClassInstallParamsA()

BOOL WINAPI SetupDiGetClassInstallParamsA ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
OUT PSP_CLASSINSTALL_HEADER ClassInstallParams  OPTIONAL,
IN DWORD  ClassInstallParamsSize,
OUT PDWORD RequiredSize  OPTIONAL 
)

Definition at line 745 of file devclass.c.

751 {
752  FIXME("SetupDiGetClassInstallParamsA(%p %p %p %lu %p) Stub\n",
754  return FALSE;
755 }
#define FIXME(fmt,...)
Definition: debug.h:110
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
_In_opt_ PSP_DEVINFO_DATA _In_ DWORD ClassInstallParamsSize
Definition: setupapi.h:1525
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523

◆ SetupDiGetClassInstallParamsW()

BOOL WINAPI SetupDiGetClassInstallParamsW ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
OUT PSP_CLASSINSTALL_HEADER ClassInstallParams  OPTIONAL,
IN DWORD  ClassInstallParamsSize,
OUT PDWORD RequiredSize  OPTIONAL 
)

Definition at line 761 of file devclass.c.

767 {
768  FIXME("SetupDiGetClassInstallParamsW(%p %p %p %lu %p) Stub\n",
770  return FALSE;
771 }
#define FIXME(fmt,...)
Definition: debug.h:110
_Inout_ PRTL_BUFFER _In_ SIZE_T RequiredSize
_In_opt_ PSP_DEVINFO_DATA _In_ DWORD ClassInstallParamsSize
Definition: setupapi.h:1525
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523

◆ SetupDiInstallClassExW()

BOOL WINAPI SetupDiInstallClassExW ( IN HWND hwndParent  OPTIONAL,
IN PCWSTR InfFileName  OPTIONAL,
IN DWORD  Flags,
IN HSPFILEQ FileQueue  OPTIONAL,
IN CONST GUID *InterfaceClassGuid  OPTIONAL,
IN PVOID  Reserved1,
IN PVOID  Reserved2 
)

Definition at line 827 of file devclass.c.

835 {
836  BOOL ret = FALSE;
837 
838  TRACE("%p %s 0x%lx %p %s %p %p\n", hwndParent, debugstr_w(InfFileName), Flags,
840 
841  if (!InfFileName)
842  {
843  FIXME("Case not implemented: InfFileName NULL\n");
845  }
847  {
848  TRACE("Unknown flags: 0x%08lx\n", Flags & ~(DI_NOVCP | DI_NOBROWSE | DI_FORCECOPY | DI_QUIETINSTALL));
850  }
851  else if ((Flags & DI_NOVCP) && FileQueue == NULL)
853  else if (Reserved1 != NULL)
855  else if (Reserved2 != NULL)
857  else
858  {
859  HDEVINFO hDeviceInfo = INVALID_HANDLE_VALUE;
860  SP_DEVINSTALL_PARAMS_W InstallParams;
861  WCHAR SectionName[MAX_PATH];
862  HINF hInf = INVALID_HANDLE_VALUE;
863  HKEY hRootKey = INVALID_HANDLE_VALUE;
865 
866  hDeviceInfo = SetupDiCreateDeviceInfoList(NULL, NULL);
867  if (hDeviceInfo == INVALID_HANDLE_VALUE)
868  goto cleanup;
869 
870  InstallParams.cbSize = sizeof(SP_DEVINSTALL_PARAMS);
871  if (!SetupDiGetDeviceInstallParamsW(hDeviceInfo, NULL, &InstallParams))
872  goto cleanup;
873 
874  InstallParams.Flags &= ~(DI_NOVCP | DI_NOBROWSE | DI_QUIETINSTALL);
875  InstallParams.Flags |= Flags & (DI_NOVCP | DI_NOBROWSE | DI_QUIETINSTALL);
876  if (Flags & DI_NOVCP)
877  InstallParams.FileQueue = FileQueue;
878  if (!SetupDiSetDeviceInstallParamsW(hDeviceInfo, NULL, &InstallParams))
879  goto cleanup;
880 
881  /* Open the .inf file */
882  hInf = SetupOpenInfFileW(
883  InfFileName,
884  NULL,
886  NULL);
887  if (hInf == INVALID_HANDLE_VALUE)
888  goto cleanup;
889 
890  /* Try to append a layout file */
892 
893  if (InterfaceClassGuid)
894  {
895  /* Retrieve the actual section name */
897  hInf,
899  SectionName,
900  MAX_PATH,
901  NULL,
902  NULL);
903  if (!ret)
904  goto cleanup;
905 
906  /* Open registry key related to this interface */
907  /* FIXME: What happens if the key doesn't exist? */
909  if (hRootKey == INVALID_HANDLE_VALUE)
910  goto cleanup;
911 
912  /* SetupDiCreateDeviceInterface??? */
913  FIXME("Installing an interface is not implemented\n");
915  }
916  else
917  {
918  /* Create or open the class registry key 'HKLM\CurrentControlSet\Class\{GUID}' */
919  hRootKey = SETUP_CreateClassKey(hInf);
920  if (hRootKey == INVALID_HANDLE_VALUE)
921  goto cleanup;
922 
923  /* Retrieve the actual section name */
925  hInf,
927  SectionName,
929  NULL,
930  NULL);
931  if (!ret)
932  goto cleanup;
933 
935  if (!callback_context)
936  goto cleanup;
937 
939  hwndParent,
940  hInf,
941  SectionName,
943  hRootKey,
944  NULL, /* FIXME: SourceRootPath */
945  !(Flags & DI_NOVCP) && (Flags & DI_FORCECOPY) ? SP_COPY_FORCE_IN_USE : 0, /* CopyFlags */
948  hDeviceInfo,
949  NULL);
950  if (!ret)
951  goto cleanup;
952 
953  /* OPTIONAL: Install .Services section */
954  lstrcatW(SectionName, DotServices);
956  hInf,
957  SectionName,
958  0,
959  hDeviceInfo,
960  NULL,
961  NULL,
962  NULL);
963  ret = TRUE;
964  }
965 
966 cleanup:
967  if (hDeviceInfo != INVALID_HANDLE_VALUE)
968  SetupDiDestroyDeviceInfoList(hDeviceInfo);
969  if (hInf != INVALID_HANDLE_VALUE)
970  SetupCloseInfFile(hInf);
971  if (hRootKey != INVALID_HANDLE_VALUE)
972  RegCloseKey(hRootKey);
974  }
975 
976  TRACE("Returning %d\n", ret);
977  return ret;
978 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
BOOL WINAPI SetupDiGetActualSectionToInstallW(HINF InfHandle, PCWSTR InfSectionName, PWSTR InfSectionWithExt, DWORD InfSectionWithExtSize, PDWORD RequiredSize, PWSTR *Extension)
Definition: devinst.c:1985
#define TRUE
Definition: types.h:120
#define SPINST_INIFILES
Definition: setupapi.h:584
WINE_UNICODE_INLINE unsigned int strlenW(const WCHAR *str)
Definition: unicode.h:212
#define INF_STYLE_WIN4
Definition: infsupp.h:41
#define DI_NOBROWSE
Definition: setupapi.h:55
BOOL WINAPI SetupInstallServicesFromInfSectionExW(HINF hinf, PCWSTR sectionname, DWORD flags, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, PVOID reserved1, PVOID reserved2)
Definition: install.c:2069
static const WCHAR ClassInstall32[]
Definition: devclass.c:31
BOOL WINAPI SetupDiSetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
Definition: devinst.c:4563
#define SPINST_BITREG
Definition: setupapi.h:588
static const WCHAR DotServices[]
Definition: devclass.c:32
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:43
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
HDEVINFO WINAPI SetupDiCreateDeviceInfoList(const GUID *ClassGuid, HWND hwndParent)
Definition: devinst.c:1214
unsigned int BOOL
Definition: ntddk_ex.h:94
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:110
BOOL WINAPI SetupDiGetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
Definition: devinst.c:4456
#define DI_NOVCP
Definition: setupapi.h:49
#define SPINST_REGISTRY
Definition: setupapi.h:585
smooth NULL
Definition: ftsmooth.c:416
static HWND hwndParent
Definition: cryptui.c:300
#define SPINST_FILES
Definition: setupapi.h:587
Definition: bcd.h:202
#define TRACE(s)
Definition: solgame.cpp:4
#define DI_FORCECOPY
Definition: setupapi.h:70
__wchar_t WCHAR
Definition: xmlstorage.h:180
BOOL WINAPI SetupDiDestroyDeviceInfoList(HDEVINFO devinfo)
Definition: devinst.c:2898
#define MAX_PATH
Definition: compat.h:26
SP_DEVINSTALL_PARAMS_A SP_DEVINSTALL_PARAMS
Definition: setupapi.h:1150
HKEY SETUP_CreateClassKey(HINF hInf)
Definition: devinst.c:3523
#define SetLastError(x)
Definition: compat.h:409
#define DI_QUIETINSTALL
Definition: setupapi.h:68
BOOL WINAPI SetupInstallFromInfSectionW(HWND owner, HINF hinf, PCWSTR section, UINT flags, HKEY key_root, PCWSTR src_root, UINT copy_flags, PSP_FILE_CALLBACK_W callback, PVOID context, HDEVINFO devinfo, PSP_DEVINFO_DATA devinfo_data)
Definition: install.c:1323
int ret
UINT WINAPI SetupDefaultQueueCallbackW(PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2)
Definition: queue.c:1777
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
Definition: queue.c:1704
#define DIOCR_INTERFACE
Definition: setupapi.h:177
BOOL WINAPI SetupOpenAppendInfFileW(PCWSTR name, HINF parent_hinf, UINT *error)
Definition: parser.c:1346
#define SP_COPY_FORCE_IN_USE
Definition: setupapi.h:481
static const WCHAR InterfaceInstall32[]
Definition: devclass.c:33
PVOID WINAPI SetupInitDefaultQueueCallback(HWND owner)
Definition: queue.c:1677
_In_ CONST GUID * InterfaceClassGuid
Definition: iofuncs.h:1134
Definition: bcd.h:201
static const char * debugstr_guid(const GUID *guid)
Definition: devclass.c:42
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
char * cleanup(char *str)
Definition: wpickclick.c:99
HKEY WINAPI SetupDiOpenClassRegKeyExW(const GUID *ClassGuid, REGSAM samDesired, DWORD Flags, PCWSTR MachineName, PVOID Reserved)
Definition: devinst.c:3667
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
Definition: lstring.c:274
#define ERROR_INVALID_FLAGS
Definition: winerror.h:583
#define SPINST_INI2REG
Definition: setupapi.h:586
#define KEY_ENUMERATE_SUB_KEYS
Definition: nt_native.h:1019

Referenced by SetupDiInstallClassExA(), and SetupDiInstallClassW().

◆ SetupDiLoadClassIcon()

BOOL WINAPI SetupDiLoadClassIcon ( IN CONST GUID ClassGuid,
OUT HICON *LargeIcon  OPTIONAL,
OUT PINT MiniIconIndex  OPTIONAL 
)

Definition at line 777 of file devclass.c.

781 {
782  INT iconIndex = 0;
783  LPWSTR DllName = NULL;
784  BOOL ret = FALSE;
785  HICON hIcon = NULL;
786 
787  if (LargeIcon)
788  {
789  if(!SETUP_GetClassIconInfo(ClassGuid, &iconIndex, &DllName))
790  goto cleanup;
791 
792  if (!DllName || ExtractIconExW(DllName, -iconIndex, &hIcon, NULL, 1) != 1 || hIcon == NULL)
793  {
794  /* load the default unknown device icon if ExtractIcon failed */
795  if(DllName)
796  iconIndex = UNKNOWN_ICON_INDEX;
797 
799 
800  if(!hIcon)
801  goto cleanup;
802  }
803 
804  *LargeIcon = hIcon;
805  }
806 
807  if (MiniIconIndex)
808  *MiniIconIndex = iconIndex;
809 
810  ret = TRUE;
811 
812 cleanup:
813 
814  if(DllName)
815  MyFree(DllName);
816 
817  TRACE("Returning %d\n", ret);
818  return ret;
819 }
#define MAKEINTRESOURCE
Definition: winuser.h:591
static HICON
Definition: imagelist.c:84
#define TRUE
Definition: types.h:120
#define IMAGE_ICON
Definition: winuser.h:212
static BOOL WINAPI SETUP_GetClassIconInfo(IN CONST GUID *ClassGuid, OUT PINT OutIndex, OUT LPWSTR *OutDllName)
Definition: devclass.c:474
int32_t INT
Definition: typedefs.h:56
HINSTANCE hInstance
Definition: charmap.c:20
unsigned int BOOL
Definition: ntddk_ex.h:94
UINT WINAPI ExtractIconExW(LPCWSTR lpszFile, INT nIconIndex, HICON *phiconLarge, HICON *phiconSmall, UINT nIcons)
Definition: iconcache.cpp:873
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define UNKNOWN_ICON_INDEX
Definition: devclass.c:79
HICON hIcon
Definition: msconfig.c:44
char * cleanup(char *str)
Definition: wpickclick.c:99
#define LoadImage
Definition: winuser.h:5716
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define LR_DEFAULTCOLOR
Definition: winuser.h:1077
VOID WINAPI MyFree(LPVOID lpMem)
Definition: misc.c:128

Referenced by UpdateDevInfo().

◆ SetupDiSetClassInstallParamsW()

BOOL WINAPI SetupDiSetClassInstallParamsW ( IN HDEVINFO  DeviceInfoSet,
IN PSP_DEVINFO_DATA DeviceInfoData  OPTIONAL,
IN PSP_CLASSINSTALL_HEADER ClassInstallParams  OPTIONAL,
IN DWORD  ClassInstallParamsSize 
)

Definition at line 1091 of file devclass.c.

1096 {
1097  struct DeviceInfoSet *list;
1098  BOOL ret = FALSE;
1099 
1100  TRACE("%p %p %p %lu\n", DeviceInfoSet, DeviceInfoData,
1102 
1103  if (!DeviceInfoSet)
1109  else if (DeviceInfoData && DeviceInfoData->cbSize != sizeof(SP_DEVINFO_DATA))
1111  else if (ClassInstallParams && ClassInstallParams->cbSize != sizeof(SP_CLASSINSTALL_HEADER))
1115  else if (!ClassInstallParams && ClassInstallParamsSize != 0)
1117  else
1118  {
1120  BOOL Result;
1121 
1124  if (!Result)
1125  goto done;
1126 
1127  if (ClassInstallParams)
1128  {
1129  DWORD i;
1130  /* Check parameters in ClassInstallParams */
1131  for (i = 0; i < sizeof(InstallParamsData) / sizeof(InstallParamsData[0]); i++)
1132  {
1133  if (InstallParamsData[i].Function == ClassInstallParams->InstallFunction)
1134  {
1136  DeviceInfoSet,
1140  if (ret)
1141  {
1144  }
1145  goto done;
1146  }
1147  }
1148  ERR("InstallFunction %u has no associated update handler\n", ClassInstallParams->InstallFunction);
1150  goto done;
1151  }
1152  else
1153  {
1156  }
1157  }
1158 
1159 done:
1160  TRACE("Returning %d\n", ret);
1161  return ret;
1162 }
#define ERROR_INVALID_PARAMETER
Definition: compat.h:91
BOOL WINAPI SetupDiSetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
Definition: devinst.c:4563
UPDATE_CLASS_PARAM_HANDLER UpdateHandler
Definition: devclass.c:65
#define ERROR_INVALID_HANDLE
Definition: compat.h:88
u32_t magic(void)
#define INVALID_HANDLE_VALUE
Definition: compat.h:391
SP_DEVINSTALL_PARAMS_W InstallParams
#define SETUP_DEVICE_INFO_SET_MAGIC
#define ERROR_INVALID_USER_BUFFER
Definition: winerror.h:1091
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
static LPOVERLAPPED_COMPLETION_ROUTINE Function
Definition: sync.c:684
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL WINAPI SetupDiGetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
Definition: devinst.c:4456
_At_(*)(_In_ PWSK_CLIENT Client, _In_opt_ PUNICODE_STRING NodeName, _In_opt_ PUNICODE_STRING ServiceName, _In_opt_ ULONG NameSpace, _In_opt_ GUID *Provider, _In_opt_ PADDRINFOEXW Hints, _Outptr_ PADDRINFOEXW *Result, _In_opt_ PEPROCESS OwningProcess, _In_opt_ PETHREAD OwningThread, _Inout_ PIRP Irp Result)(Mem)) NTSTATUS(WSKAPI *PFN_WSK_GET_ADDRESS_INFO
Definition: wsk.h:426
#define TRACE(s)
Definition: solgame.cpp:4
_In_opt_ PSP_DEVINFO_DATA _In_ DWORD ClassInstallParamsSize
Definition: setupapi.h:1525
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
Definition: setupapi.h:1523
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SetLastError(x)
Definition: compat.h:409
#define DI_CLASSINSTALLPARAMS
Definition: setupapi.h:66
int ret
Definition: _list.h:228
#define ERR(fmt,...)
Definition: debug.h:109
#define list
Definition: rosglue.h:35
struct _SP_DEVINSTALL_PARAMS_W SP_DEVINSTALL_PARAMS_W
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:92
static const INSTALL_PARAMS_DATA InstallParamsData[]
Definition: devclass.c:73

Referenced by CDeviceNode::EnableDevice(), CDeviceNode::UninstallDevice(), and UninstallDriver().

Variable Documentation

◆ BackSlash

const WCHAR BackSlash[] = {'\\',0}
static

◆ ClassGUID

◆ ClassInstall32

const WCHAR ClassInstall32[] = {'C','l','a','s','s','I','n','s','t','a','l','l','3','2',0}
static

Definition at line 31 of file devclass.c.

Referenced by SetupDiInstallClassExW().

◆ DotServices

const WCHAR DotServices[] = {'.','S','e','r','v','i','c','e','s',0}
static

Definition at line 32 of file devclass.c.

Referenced by SetupDiInstallClassExW().

◆ InstallParamsData

const INSTALL_PARAMS_DATA InstallParamsData[]
static
Initial value:
= {
}

Definition at line 73 of file devclass.c.

Referenced by SetupDiSetClassInstallParamsW().

◆ InterfaceInstall32

const WCHAR InterfaceInstall32[] = {'I','n','t','e','r','f','a','c','e','I','n','s','t','a','l','l','3','2',0}
static

Definition at line 33 of file devclass.c.

Referenced by SetupDiInstallClassExW().

◆ SetupapiDll

const WCHAR SetupapiDll[] = {'s','e','t','u','p','a','p','i','.','d','l','l',0}
static

Definition at line 34 of file devclass.c.

Referenced by SETUP_GetClassIconInfo().