25static const WCHAR AddInterface[] = {
'A',
'd',
'd',
'I',
'n',
't',
'e',
'r',
'f',
'a',
'c',
'e',0};
28static const WCHAR DeviceInstance[] = {
'D',
'e',
'v',
'i',
'c',
'e',
'I',
'n',
's',
't',
'a',
'n',
'c',
'e',0};
29static const WCHAR DotInterfaces[] = {
'.',
'I',
'n',
't',
'e',
'r',
'f',
'a',
'c',
'e',
's',0};
31static const WCHAR SymbolicLink[] = {
'S',
'y',
'm',
'b',
'o',
'l',
'i',
'c',
'L',
'i',
'n',
'k',0};
53 deviceInterface->
Flags = 0;
73 BOOL OnlyPresentInterfaces)
76 HKEY hDeviceInstanceKey;
93 hDeviceInstanceKey =
NULL;
109 dwLength =
sizeof(KeyBuffer) /
sizeof(KeyBuffer[0]);
118 if (hDeviceInstanceKey !=
NULL)
143 InstancePath[dwInstancePathLength /
sizeof(
WCHAR)] =
'\0';
149 if (
strcmpW(DeviceInstanceW, InstancePath) != 0)
177 KeyBuffer[37] =
'\0';
195 dwLength =
sizeof(KeyBuffer) /
sizeof(KeyBuffer[0]);
202 if (KeyBuffer[0] !=
'#')
207 if (hReferenceKey !=
NULL)
252 if (KeyBuffer[1] ==
'\0')
258 if (OnlyPresentInterfaces)
271 && dwRegType ==
REG_DWORD && LinkedValue)
283 if (hReferenceKey !=
NULL)
285 if (hDeviceInstanceKey !=
NULL)
344 if (InterfaceFlags != 0)
407 return SetupInstallFromInfSectionW(
NULL, hInf, InterfaceSection,
SPINST_REGISTRY, hRefKey,
NULL, 0,
NULL,
NULL,
NULL,
NULL);
441 DWORD SectionNameLength = 0;
458 if (SelectedDriver ==
NULL)
533 MyFree(InterfaceGuidString);
561 else if (!DeviceInterfaceData)
563 else if (DeviceInterfaceData && DeviceInterfaceData->Reserved == 0)
640 FIXME(
"SetupDiDeleteDeviceInterfaceData(%p %p) stub\n",
PRTL_UNICODE_STRING_BUFFER Path
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
#define MAX_GUID_STRING_LEN
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)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
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)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
#define ERROR_INVALID_PARAMETER
#define INVALID_HANDLE_VALUE
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
#define ERROR_INVALID_HANDLE
static DWORD DWORD * dwLength
static void cleanup(void)
BOOL WINAPI SetupDiGetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
BOOL WINAPI SetupDiGetActualSectionToInstallW(HINF InfHandle, PCWSTR InfSectionName, PWSTR InfSectionWithExt, DWORD InfSectionWithExtSize, PDWORD RequiredSize, PWSTR *Extension)
HKEY WINAPI SetupDiCreateDeviceInterfaceRegKeyW(HDEVINFO DeviceInfoSet, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData, DWORD Reserved, REGSAM samDesired, HINF InfHandle, PCWSTR InfSectionName)
HKEY WINAPI SetupDiOpenClassRegKeyExW(const GUID *ClassGuid, REGSAM samDesired, DWORD Flags, PCWSTR MachineName, PVOID Reserved)
BOOL CreateDeviceInfo(IN struct DeviceInfoSet *list, IN LPCWSTR InstancePath, IN LPCGUID pClassGuid, OUT struct DeviceInfo **pDeviceInfo)
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)
BOOL GetStringField(PINFCONTEXT context, DWORD index, PWSTR *value)
BOOL DestroyDeviceInterface(struct DeviceInterface *deviceInterface)
static const WCHAR SymbolicLink[]
static const WCHAR ClassGUID[]
static BOOL CreateDeviceInterface(IN struct DeviceInfo *deviceInfo, IN LPCWSTR SymbolicLink, IN LPCGUID pInterfaceGuid, OUT struct DeviceInterface **pDeviceInterface)
static const WCHAR Linked[]
BOOL WINAPI SetupDiInstallDeviceInterfaces(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData)
static const WCHAR AddInterface[]
static const WCHAR DotInterfaces[]
BOOL WINAPI SetupDiDeleteDeviceInterfaceData(HDEVINFO DeviceInfoSet, PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData)
LONG SETUP_CreateInterfaceList(struct DeviceInfoSet *list, PCWSTR MachineName, CONST GUID *InterfaceGuid, PCWSTR DeviceInstanceW, BOOL OnlyPresentInterfaces)
static BOOL InstallOneInterface(IN LPGUID InterfaceGuid, IN LPCWSTR ReferenceString, IN LPCWSTR InterfaceSection, IN UINT InterfaceFlags, IN HINF hInf, IN HDEVINFO DeviceInfoSet, IN struct DeviceInfo *devInfo)
HKEY WINAPI SetupDiOpenDeviceInterfaceRegKey(IN HDEVINFO DeviceInfoSet, IN PSP_DEVICE_INTERFACE_DATA DeviceInterfaceData, IN DWORD Reserved, IN REGSAM samDesired)
static const WCHAR DeviceInstance[]
static LPWSTR CreateSymbolicLink(IN LPGUID InterfaceGuid, IN LPCWSTR ReferenceString, IN struct DeviceInfo *devInfo)
VOID WINAPI MyFree(LPVOID lpMem)
DWORD WINAPI pSetupStringFromGuid(LPGUID lpGUID, PWSTR pString, DWORD dwStringLen)
BOOL WINAPI SetupFindNextMatchLineW(PINFCONTEXT context_in, PCWSTR key, PINFCONTEXT context_out)
#define InsertTailList(ListHead, Entry)
FxDeviceInterface * pDeviceInterface
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
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define memcpy(s1, s2, n)
#define memmove(s1, s2, n)
#define KEY_ENUMERATE_SUB_KEYS
_In_ ULONG _In_ ULONG Offset
_In_ ULONG _In_ ULONG _In_ ULONG Length
#define IsEqualIID(riid1, riid2)
#define REGSTR_PATH_SYSTEMENUM
RPC_STATUS WINAPI UuidFromStringW(RPC_WSTR s, UUID *uuid)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
_In_ DWORD _Out_ PDWORD _In_opt_ PCSTR MachineName
#define ERROR_NO_DRIVER_SELECTED
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
struct _SP_DEVICE_INTERFACE_DATA SP_DEVICE_INTERFACE_DATA
#define SETUP_DEVICE_INFO_SET_MAGIC
LIST_ENTRY InterfaceListHead
SP_DEVINSTALL_PARAMS_W InstallParams
struct DeviceInfo * DeviceInfo
WCHAR SymbolicLink[ANYSIZE_ARRAY]
struct InfFileDetails * InfFileDetails
SP_DRVINFO_DETAIL_DATA_W Details
ULONG_PTR ClassInstallReserved
WCHAR SectionName[LINE_LEN]
#define FIELD_OFFSET(t, f)
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
BOOL WINAPI SetupGetIntField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT INT *IntegerValue)
_In_ WDFCOLLECTION _In_ ULONG Index
_Must_inspect_result_ _In_ WDFDEVICE _In_ CONST GUID _In_opt_ PCUNICODE_STRING ReferenceString
_Must_inspect_result_ _In_ WDFOBJECT _In_ CONST GUID * Guid
_In_ WDF_WMI_PROVIDER_CONTROL Control
DWORD WINAPI GetLastError(void)
_Reserved_ PVOID Reserved
#define ERROR_INVALID_USER_BUFFER
#define ERROR_GEN_FAILURE
static const GUID InterfaceGuid
_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