79 if (ParamArray ==
NULL)
82 for (
i = 0;
i < ParamArray->dwCount;
i++)
84 if (ParamArray->Array[
i].pszName !=
NULL)
87 if (ParamArray->Array[
i].pszDescription !=
NULL)
90 if (ParamArray->Array[
i].pszDefault !=
NULL)
94 if (ParamArray->Array[
i].pEnumOptions !=
NULL)
96 for (
j = 0;
j < ParamArray->Array[
i].dwEnumOptions;
j++)
98 if (ParamArray->Array[
i].pEnumOptions[
j].pszValue !=
NULL)
101 if (ParamArray->Array[
i].pEnumOptions[
j].pszName !=
NULL)
176 if (szBuffer[0] ==
L'0')
294 DWORD dwValues, dwMaxValueNameLen, dwMaxValueLen;
295 DWORD dwValueNameLength, dwValueLength;
321 ERR(
"RegQueryInfoKeyW failed (Error %lu)\n", dwError);
328 if (pOptions ==
NULL)
334 for (
i = 0;
i < dwValues;
i++)
336 dwValueNameLength = dwMaxValueNameLen +
sizeof(
WCHAR);
339 dwValueNameLength *
sizeof(
WCHAR));
340 if (pOptions[
i].pszValue ==
NULL)
346 dwValueLength = dwMaxValueLen;
350 if (pOptions[
i].pszName ==
NULL)
358 pOptions[
i].pszValue,
362 (
PBYTE)pOptions[
i].pszName,
375 pParameter->pEnumOptions = pOptions;
376 pParameter->dwEnumOptions = dwValues;
380 if (pOptions !=
NULL)
382 for (
i = 0;
i < dwValues;
i++)
384 if (pOptions[
i].pszValue !=
NULL)
387 if (pOptions[
i].pszName !=
NULL)
409 if ((pParameter->pEnumOptions ==
NULL) ||
410 (pParameter->dwEnumOptions == 0))
413 for (
i = 0;
i < pParameter->dwEnumOptions;
i++)
415 if (
_wcsicmp(pParameter->pEnumOptions[
i].pszValue, pszValue) == 0)
434 DWORD dwSubKeys, dwMaxSubKeyLen, dwKeyLen, dwIndex;
437 LONG lDefaultMin, lDefaultMax;
438 DWORD dwDefaultMin, dwDefaultMax;
449 ERR(
"SetupDiOpenDevRegKey() failed\n");
460 ERR(
"RegOpenKeyExW failed (Error %lu)\n", lError);
478 ERR(
"RegOpenKeyExW failed (Error %lu)\n", lError);
482 TRACE(
"Sub keys: %lu\n", dwSubKeys);
486 TRACE(
"No sub keys. Done!\n");
493 if (ParamArray ==
NULL)
495 ERR(
"Parameter array allocation failed!\n");
501 ParamArray->
dwCount = dwSubKeys;
505 for (dwIndex = 0; dwIndex < dwSubKeys; dwIndex++)
509 dwMaxSubKeyLen *
sizeof(
WCHAR));
512 ERR(
"Parameter array allocation failed!\n");
516 dwKeyLen = dwMaxSubKeyLen;
550 else if (
_wcsicmp(pszType,
L"long") == 0)
552 else if (
_wcsicmp(pszType,
L"word") == 0)
554 else if (
_wcsicmp(pszType,
L"dword") == 0)
556 else if (
_wcsicmp(pszType,
L"edit") == 0)
558 else if (
_wcsicmp(pszType,
L"enum") == 0)
584 lDefaultMin = -32768L;
585 lDefaultMax = 32767L;
589 lDefaultMin = (-2147483647L - 1);
590 lDefaultMax = 2147483647L;
595 dwDefaultMax = 65535UL;
600 dwDefaultMax = 4294967295UL;
609 &ParamArray->
Array[dwIndex].
u.
l.lMin);
614 &ParamArray->
Array[dwIndex].
u.
l.lMax);
622 &ParamArray->
Array[dwIndex].
u.
dw.dwMin);
627 &ParamArray->
Array[dwIndex].
u.
dw.dwMax);
655 &ParamArray->
Array[dwIndex]);
672 *ParameterArray = ParamArray;
700 if (iIndex !=
CB_ERR && iIndex < pParam->dwEnumOptions)
752 if (ParamArray ==
NULL)
756 ParamArray->DeviceInfoData,
763 ERR(
"SetupDiOpenDevRegKey() failed\n");
767 for (
i = 0;
i < ParamArray->dwCount;
i++)
769 Param = &ParamArray->Array[
i];
771 if (Param == ParamArray->pCurrentParam)
799 ParamArray->DeviceInfoData,
805 ParamArray->DeviceInfoData,
893 Style &= ~ES_UPPERCASE;
955 TRACE(
"OnInitDialog()\n");
958 if (pParamArray ==
NULL)
960 ERR(
"pParamArray is NULL\n");
1003 TRACE(
"OnCommand()\n");
1006 if (pParamArray ==
NULL)
1008 ERR(
"pParamArray is NULL\n");
1020 if (iIndex !=
LB_ERR && iIndex < pParamArray->dwCount)
1052 TRACE(
"OnNotify()\n");
1055 if (pParamArray ==
NULL)
1057 ERR(
"pParamArray is NULL\n");
1063 TRACE(
"PSN_APPLY!\n");
1081 TRACE(
"OnDestroy()\n");
1084 if (pParamArray ==
NULL)
1086 ERR(
"pParamArray is NULL\n");
1140 TRACE(
"NetPropPageProvider(%p %p %lx)\n",
1141 lpPropSheetPageRequest, lpfnAddPropSheetPageProc,
lParam);
1150 TRACE(
"SPPSR_ENUM_ADV_DEVICE_PROPERTIES\n");
1161 if (hPropSheetPage ==
NULL)
1163 ERR(
"CreatePropertySheetPageW() failed!\n");
1167 if (!(*lpfnAddPropSheetPageProc)(hPropSheetPage,
lParam))
1169 ERR(
"lpfnAddPropSheetPageProc() failed!\n");
#define RegCloseKey(hKey)
#define ERROR_NOT_ENOUGH_MEMORY
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 RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegDeleteValueW(HKEY hKey, LPCWSTR lpValueName)
LONG WINAPI RegEnumValueW(_In_ HKEY hKey, _In_ DWORD index, _Out_ LPWSTR value, _Inout_ PDWORD val_count, _Reserved_ PDWORD reserved, _Out_opt_ PDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ PDWORD count)
LONG WINAPI RegQueryInfoKeyW(HKEY hKey, LPWSTR lpClass, LPDWORD lpcClass, LPDWORD lpReserved, LPDWORD lpcSubKeys, LPDWORD lpcMaxSubKeyLen, LPDWORD lpcMaxClassLen, LPDWORD lpcValues, LPDWORD lpcMaxValueNameLen, LPDWORD lpcMaxValueLen, LPDWORD lpcbSecurityDescriptor, PFILETIME lpftLastWriteTime)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
HPROPSHEETPAGE WINAPI CreatePropertySheetPageW(LPCPROPSHEETPAGEW lpPropSheetPage)
BOOL WINAPI DestroyPropertySheetPage(HPROPSHEETPAGE hPropPage)
#define INVALID_HANDLE_VALUE
#define ERROR_NO_MORE_ITEMS
#define HeapFree(x, y, z)
static DWORD DWORD * dwLength
HINSTANCE netcfgx_hInstance
#define IDC_PROPERTY_VALUE_UPDN
#define IDC_PROPERTY_NAME
#define IDC_PROPERTY_PRESENT
#define IDD_NET_PROPERTY_DLG
#define IDC_PROPERTY_VALUE_LIST
#define IDC_PROPERTY_VALUE_EDIT
#define IDC_PROPERTY_NOT_PRESENT
BOOL WINAPI SetupDiSetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, IN PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
BOOL WINAPI SetupDiGetDeviceInstallParamsW(IN HDEVINFO DeviceInfoSet, IN PSP_DEVINFO_DATA DeviceInfoData OPTIONAL, OUT PSP_DEVINSTALL_PARAMS_W DeviceInstallParams)
HKEY WINAPI SetupDiOpenDevRegKey(HDEVINFO DeviceInfoSet, PSP_DEVINFO_DATA DeviceInfoData, DWORD Scope, DWORD HwProfile, DWORD KeyType, REGSAM samDesired)
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
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define ERROR_FILE_NOT_FOUND
struct _PSP * HPROPSHEETPAGE
static DWORD GetEnumOptions(_In_ HKEY hKey, _In_ PPARAMETER pParameter)
static DWORD GetBooleanValue(_In_ HKEY hKey, _In_ PWSTR pValueName, _In_ BOOL bDefault, _Out_ PBOOL pValue)
struct _PARAMETER PARAMETER
struct _ENUM_OPTION * PENUM_OPTION
static VOID ReadParameterValue(HWND hwnd, PPARAMETER pParam)
static DWORD GetStringValue(_In_ HKEY hKey, _In_ PWSTR pValueName, _Out_ PWSTR *pString, _Out_opt_ PDWORD pdwStringLength)
static DWORD GetDWordValue(_In_ HKEY hKey, _In_ PWSTR pValueName, _In_ DWORD dwDefault, _Out_ PDWORD pValue)
enum _PARAM_TYPE * PPARAM_TYPE
struct _PARAMETER_ARRAY PARAMETER_ARRAY
static BOOL BuildParameterArray(_In_ HDEVINFO DeviceInfoSet, _In_ PSP_DEVINFO_DATA DeviceInfoData, _Out_ PPARAMETER_ARRAY *ParameterArray)
static VOID OnDestroy(HWND hwnd)
struct _ENUM_OPTION ENUM_OPTION
static DWORD GetIntValue(_In_ HKEY hKey, _In_ PWSTR pValueName, _In_ INT iDefault, _Out_ PINT pValue)
BOOL WINAPI NetPropPageProvider(PSP_PROPSHEETPAGE_REQUEST lpPropSheetPageRequest, LPFNADDPROPSHEETPAGE lpfnAddPropSheetPageProc, LPARAM lParam)
enum _PARAM_TYPE PARAM_TYPE
static VOID DisplayParameter(_In_ HWND hwnd, _In_ PPARAMETER Parameter)
static VOID OnNotify(HWND hwnd, WPARAM wParam, LPARAM lParam)
static VOID WriteParameterArray(_In_ HWND hwnd, _In_ PPARAMETER_ARRAY ParamArray)
struct _PARAMETER * PPARAMETER
static INT_PTR CALLBACK NetPropertyPageDlgProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
static DWORD GetLongValue(_In_ HKEY hKey, _In_ PWSTR pValueName, _In_ LONG lDefault, _Out_ PLONG pValue)
static VOID OnCommand(HWND hwnd, WPARAM wParam, LPARAM lParam)
static BOOL OnInitDialog(HWND hwnd, WPARAM wParam, LPARAM lParam)
static VOID FreeParameterArray(_In_ PPARAMETER_ARRAY ParamArray)
struct _PARAMETER_ARRAY * PPARAMETER_ARRAY
static INT FindEnumOption(_In_ PPARAMETER pParameter, _In_ PWSTR pszValue)
struct _PROPSHEETPAGEW PROPSHEETPAGEW
BOOL(CALLBACK * LPFNADDPROPSHEETPAGE)(HPROPSHEETPAGE, LPARAM)
struct _NM_UPDOWN * LPNMUPDOWN
_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)
struct _SP_DEVINSTALL_PARAMS_W SP_DEVINSTALL_PARAMS_W
_In_opt_ PSP_DEVINFO_DATA DeviceInfoData
#define DI_FLAGSEX_PROPCHANGE_PENDING
#define SPPSR_ENUM_ADV_DEVICE_PROPERTIES
PSP_DEVINFO_DATA DeviceInfoData
struct _PARAMETER::@520::@521 l
struct _PARAMETER::@520::@522 dw
PENUM_OPTION pEnumOptions
PSP_DEVINFO_DATA DeviceInfoData
#define ListBox_GetCurSel(hwndCtl)
#define ComboBox_SetCurSel(hwndCtl, index)
#define Edit_LimitText(hwndCtl, cchMax)
#define ComboBox_GetCurSel(hwndCtl)
#define ListBox_SetCurSel(hwndCtl, index)
#define ListBox_GetItemData(hwndCtl, index)
#define Edit_GetTextLength(hwndCtl)
#define ListBox_SetItemData(hwndCtl, index, data)
#define ComboBox_AddString(hwndCtl, lpsz)
#define ComboBox_ResetContent(hwndCtl)
#define Edit_GetText(hwndCtl, lpch, cchMax)
#define Edit_SetText(hwndCtl, lpsz)
#define ListBox_AddString(hwndCtl, lpsz)
#define Button_SetCheck(hwndCtl, check)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
_Inout_opt_ PVOID Parameter