58 for (
x = 0;
x < uID;
x++)
60 lpStr += (*lpStr) + 1;
83 if ((*lpTarget) !=
NULL)
117 (ln + 1) *
sizeof(
WCHAR));
118 if ((*lpTarget) !=
NULL)
136 return s - *lpTarget;
257 if (lpUnicodeStr ==
NULL)
346 L"LocationInformationOverride",
352 szBuffer[0] !=
L'\0')
367 if (dnParentDevInst != 0)
404 if (Ret && szBuffer[0] >=
L'0' && szBuffer[0] <=
L'9')
533 szBuffer[0] !=
L'\0')
545 if (szBuffer[0] ==
L'\0')
591 szBuffer[0] !=
L'\0')
603 if (szBuffer[0] ==
L'\0')
836 if (bNeedReboot !=
NULL)
955 ERR(
"SetupDiSetDeviceInstallParams() failed with error 0x%lx\n",
GetLastError());
959#ifdef DI_FLAGSEX_INSTALLEDDRIVER
991 ERR(
"SetupDiOpenDevRegKey() failed with error 0x%lx\n",
GetLastError());
996 dwLength = (
sizeof(InfPath) /
sizeof(InfPath[0])) - 1;
1009 else if (dwType !=
REG_SZ)
1011 ERR(
"Expected registry type REG_SZ (%lu), got %lu\n",
REG_SZ, dwType);
1025 ERR(
"SetupDiSetDeviceInstallParams() failed with error 0x%lx\n",
GetLastError());
1034 ERR(
"SetupDiBuildDriverInfoList() failed with error 0x%lx\n",
GetLastError());
1039 dwLength = (
sizeof(InfSection) /
sizeof(InfSection[0])) - 1;
1052 else if (dwType !=
REG_SZ)
1054 ERR(
"Expected registry type REG_SZ (%lu), got %lu\n",
REG_SZ, dwType);
1073 &DriverInfoDetailData,
1074 DriverInfoDetailData.
cbSize,
1078 ERR(
"SetupDiGetDriverInfoDetail() failed with error 0x%lx\n",
GetLastError());
1092 ERR(
"SetupDiEnumDriverInfo() failed with error 0x%lx\n",
GetLastError());
1109 PINITCOMMONCONTROLS pInitCommonControls;
1113 if (hComCtl32 !=
NULL)
1116 pInitCommonControls = (PINITCOMMONCONTROLS)
GetProcAddress(hComCtl32,
1117 "InitCommonControls");
1118 if (pInitCommonControls ==
NULL)
1124 pInitCommonControls();
1134 WCHAR szMachineName[])
1138 szDeviceID[0] =
L'\0';
1139 szMachineName[0] =
L'\0';
1141 while (*lpString !=
L'\0')
1143 if (*lpString ==
L'/')
1149 if (*lpString !=
L'\0')
1152 while ((*lpString !=
L' ') &&
1153 (*lpString !=
L'\0') &&
1156 szDeviceID[
i++] = *lpString++;
1158 szDeviceID[
i] =
L'\0';
1162 else if (!
_wcsnicmp(lpString,
L"MachineName", 11))
1165 if (*lpString !=
L'\0')
1168 while ((*lpString !=
L' ') &&
1169 (*lpString !=
L'\0') &&
1172 szMachineName[
i++] = *lpString++;
1174 szMachineName[
i] =
L'\0';
#define RegCloseKey(hKey)
#define CM_DRP_LOCATION_INFORMATION
#define CM_DRP_DEVICEDESC
#define CM_Get_DevNode_Registry_Property
CONFIGRET WINAPI CM_Get_DevNode_Status_Ex(_Out_ PULONG pulStatus, _Out_ PULONG pulProblemNumber, _In_ DEVINST dnDevInst, _In_ ULONG ulFlags, _In_opt_ HMACHINE hMachine)
static HINSTANCE hDllInstance
#define ERROR_NOT_ENOUGH_MEMORY
#define ERROR_INSUFFICIENT_BUFFER
#define MAX_DEVICE_ID_LEN
UINT WINAPI DeviceProblemTextW(IN HMACHINE hMachine OPTIONAL, IN DEVINST dnDevInst, IN ULONG uProblemId, OUT LPWSTR lpString, IN UINT uMaxString)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
#define MultiByteToWideChar
INT LengthOfStrResource(IN HINSTANCE hInst, IN UINT uID)
BOOL IsDeviceStarted(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *IsStarted)
LPWSTR ConvertMultiByteToUnicode(IN LPCSTR lpMultiByteStr, IN UINT uCodePage)
BOOL FindCurrentDriver(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT PSP_DRVINFO_DATA DriverInfoData)
static INT AllocAndLoadString(OUT LPWSTR *lpTarget, IN HINSTANCE hInst, IN UINT uID)
static INT AllocAndLoadStringsCat(OUT LPWSTR *lpTarget, IN HINSTANCE hInst, IN UINT *uID, IN UINT nIDs)
BOOL GetDeviceLocationString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, IN DEVINST dnParentDevInst OPTIONAL, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL GetDeviceManufacturerString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL GetDriverVersionString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL IsDeviceHidden(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *IsHidden)
BOOL GetDriverDateString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL CanDisableDevice(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *CanDisable)
BOOL GetDriverProviderString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL GetDeviceTypeString(IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
DWORD LoadAndFormatString(IN HINSTANCE hInstance, IN UINT uID, OUT LPWSTR *lpTarget,...)
BOOL GetDeviceStatusString(IN DEVINST DevInst, IN HMACHINE hMachine, OUT LPWSTR szBuffer, IN DWORD BufferSize)
BOOL GetDeviceDescriptionString(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData, OUT LPWSTR szBuffer, IN DWORD BufferSize)
DWORD LoadAndFormatStringsCat(IN HINSTANCE hInstance, IN UINT *uID, IN UINT nIDs, OUT LPWSTR *lpTarget,...)
LPARAM ListViewGetSelectedItemData(IN HWND hwnd)
HINSTANCE LoadAndInitComctl32(VOID)
BOOL EnableDevice(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DevInfoData OPTIONAL, IN BOOL bEnable, IN DWORD HardwareProfile OPTIONAL, OUT BOOL *bNeedReboot OPTIONAL)
BOOL IsDriverInstalled(IN DEVINST DevInst, IN HMACHINE hMachine, OUT BOOL *Installed)
BOOL GetDeviceAndComputerName(LPWSTR lpString, WCHAR szDeviceID[], WCHAR szMachineName[])
#define IDS_NODRIVERLOADED
#define IDS_DEV_NO_PROBLEM
#define IDS_UNKNOWNDEVICE
static DWORD DWORD * dwLength
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
BOOL WINAPI SystemTimeToTzSpecificLocalTime(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation, CONST SYSTEMTIME *lpUniversalTime, LPSYSTEMTIME lpLocalTime)
BOOL WINAPI SetupDiCallClassInstaller(DI_FUNCTION InstallFunction, HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData)
HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Scope, DWORD HwProfile, DWORD KeyType, REGSAM samDesired)
BOOL WINAPI SetupDiBuildDriverInfoList(IN HDEVINFO DeviceInfoSet, IN OUT PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN DWORD DriverType)
static const WCHAR Cleanup[]
GLint GLint GLint GLint GLint x
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
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
struct _FILETIME FILETIME
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
_In_ NDIS_STATUS _In_ ULONG _In_ USHORT _In_opt_ PVOID _In_ ULONG DataSize
#define LOCALE_USER_DEFAULT
#define ListView_GetNextItem(hwnd, i, flags)
#define ListView_GetItem(hwnd, pitem)
#define REGSTR_VAL_INFPATH
#define REGSTR_VAL_INFSECTION
#define REGSTR_VAL_PROVIDER_NAME
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
_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 wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
_Check_return_ _CRTIMP int __cdecl _wcsnicmp(_In_reads_or_z_(_MaxCount) const wchar_t *_Str1, _In_reads_or_z_(_MaxCount) const wchar_t *_Str2, _In_ size_t _MaxCount)
struct _SP_CLASSINSTALL_HEADER SP_CLASSINSTALL_HEADER
#define SetupDiGetDriverInfoDetail
#define SPDIT_CLASSDRIVER
#define SetupDiGetDeviceInstallParams
SP_DEVINSTALL_PARAMS_A SP_DEVINSTALL_PARAMS
#define SetupDiSetClassInstallParams
#define SetupDiGetDeviceRegistryProperty
SP_DRVINFO_DATA_V2 SP_DRVINFO_DATA
#define ERROR_NO_DRIVER_SELECTED
SP_DRVINFO_DETAIL_DATA_A SP_DRVINFO_DETAIL_DATA
#define DICS_FLAG_CONFIGSPECIFIC
#define SetupDiSetDeviceInstallParams
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
#define SetupDiGetClassDescription
#define SetupDiEnumDriverInfo
#define DI_FLAGSEX_ALLOWEXCLUDEDDRVS
#define DIF_PROPERTYCHANGE
#define SPDRP_FRIENDLYNAME
PULONG MinorVersion OPTIONAL
CHAR DriverPath[MAX_PATH]
CHAR SectionName[LINE_LEN]
SP_CLASSINSTALL_HEADER ClassInstallHeader
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ WDFMEMORY _Out_opt_ size_t * BufferSize
DWORD WINAPI GetLastError(void)
#define FORMAT_MESSAGE_FROM_STRING
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define MAX_COMPUTERNAME_LENGTH
#define ERROR_GEN_FAILURE
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)