23 #define NTOS_MODE_USER 56 wcscpy(errfmt,
L"Unknown error string!");
87 wcscpy(errfmt,
L"Unknown error string!");
278 WCHAR ValueString[32];
449 lvC.pszText = szText;
697 for (
i = 0;
i < pPartialResourceList->
Count;
i++)
701 switch (pDescriptor->
Type)
876 if (lpnmlv->
iItem != -1)
958 lvC.pszText = szText;
1025 if (lpnmlv->
iItem != -1)
1138 size_t llen, listlen, nl_len;
1156 listlen =
sizeof(
WCHAR);
1158 while(*
src !=
L'\0')
1163 listlen += (llen *
sizeof(
WCHAR)) + nl_len;
1184 size_t linechars, buflen, c_nl,
dest;
1187 buflen =
sizeof(
WCHAR);
1191 while(*
src !=
L'\0')
1195 linechars = nl -
src;
1209 buflen += ((linechars + 1) *
sizeof(
WCHAR));
1219 src += linechars + (nl !=
NULL ? c_nl : 0);
1368 DWORD dwDisposition;
1371 DWORD dwIndex, dwType, cbName, cbData;
1372 WCHAR szSubKey[256];
1373 WCHAR szValueName[256];
1374 BYTE szValueData[512];
1384 hSrcKey = hSrcSubKey;
1389 &hDestSubKey, &dwDisposition);
1397 cbName =
sizeof(szSubKey) /
sizeof(szSubKey[0]);
1401 lResult =
CopyKey(hDestSubKey, szSubKey, hSrcKey, szSubKey);
1412 cbName =
sizeof(szValueName) /
sizeof(szValueName[0]);
1413 cbData =
sizeof(szValueData) /
sizeof(szValueData[0]);
1414 lResult =
RegEnumValueW(hSrcKey, dwIndex++, szValueName, &cbName,
NULL, &dwType, szValueData, &cbData);
1417 lResult =
RegSetValueExW(hDestSubKey, szValueName, 0, dwType, szValueData, cbData);
1443 if (
_wcsicmp(lpDestSubKey, lpSrcSubKey) == 0)
1449 lResult =
CopyKey(hDestKey, lpDestSubKey, hSrcKey, lpSrcSubKey);
1503 if (lpNewSubKey !=
NULL)
1505 memcpy(lpNewSubKey, lpSubKey, (
s - lpSubKey) *
sizeof(
WCHAR));
1506 wcscpy(lpNewSubKey + (
s - lpSubKey), lpNewName);
1507 lpNewName = lpNewSubKey;
1526 DWORD dwType, cbData;
1537 cbData =
sizeof(
data);
1558 DWORD cbData, dwType;
1568 cbData = (dwBufferLen - 1) *
sizeof(*pszBuffer);
1578 pszBuffer[cbData /
sizeof(*pszBuffer)] =
L'\0';
1582 pszBuffer[0] =
L'\0';
1593 pszRootKey =
L"HKEY_CLASSES_ROOT";
1595 pszRootKey =
L"HKEY_CURRENT_USER";
1597 pszRootKey =
L"HKEY_LOCAL_MACHINE";
1599 pszRootKey =
L"HKEY_USERS";
1601 pszRootKey =
L"HKEY_CURRENT_CONFIG";
1603 pszRootKey =
L"HKEY_DYN_DATA";
1608 _snwprintf(pszDest, iDestLength,
L"%s\\%s", pszRootKey, lpSubKey);
1610 _snwprintf(pszDest, iDestLength,
L"%s", pszRootKey);
static EDIT_MODE dwordEditMode
static INT_PTR CALLBACK modify_resource_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@379::@381 Port
void error(HWND hwnd, INT resId,...)
#define CmResourceTypeDeviceSpecific
GLint GLint GLsizei width
#define IDS_PORT_MEMORY_IO
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR * PCM_PARTIAL_RESOURCE_DESCRIPTOR
enum _EDIT_MODE EDIT_MODE
#define IDS_DEFAULT_VALUE_NAME
int ErrorMessageBox(HWND hWnd, LPCWSTR lpTitle, DWORD dwErrorCode,...)
enum _INTERFACE_TYPE INTERFACE_TYPE
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@379::@384 Memory
#define IDD_EDIT_BIN_DATA
#define IDS_MEMORY_READ_WRITE
#define ERROR_INVALID_FUNCTION
CM_FULL_RESOURCE_DESCRIPTOR List[1]
#define UNREFERENCED_PARAMETER(P)
_CONST_RETURN wchar_t *__cdecl wcsstr(_In_z_ const wchar_t *_Str, _In_z_ const wchar_t *_SubStr)
#define IDD_EDIT_RESOURCE
#define HKEY_CURRENT_USER
static INT fullResourceIndex
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@379::@382 Interrupt
#define IDS_SPECIFIC_DATASIZE
LONG RenameValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpDestValue, LPCWSTR lpSrcValue)
static VOID GetInterfaceType(INTERFACE_TYPE InterfaceType, LPWSTR pBuffer, DWORD dwLength)
#define LVS_EX_FULLROWSELECT
INT_PTR CALLBACK modify_multi_string_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define ERROR_NOT_ENOUGH_MEMORY
static const WCHAR * editValueName
HWND WINAPI SetFocus(_In_opt_ HWND)
#define IDS_BUS_TURBOCHANNEL
_Check_return_ unsigned long __cdecl wcstoul(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define ListView_InsertItem(hwnd, pitem)
#define HKEY_CURRENT_CONFIG
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
#define IDS_INTERRUPT_VECTOR
#define CmResourceTypePort
static DWORD valueDataLen
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 RenameKey(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpNewName)
#define CM_RESOURCE_MEMORY_WRITE_ONLY
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
static LONG CopyKey(HKEY hDestKey, LPCWSTR lpDestSubKey, HKEY hSrcKey, LPCWSTR lpSrcSubKey)
CM_PARTIAL_RESOURCE_LIST PartialResourceList
static PVOID binValueData
static INT_PTR CALLBACK modify_resource_list_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define ListView_InsertColumn(hwnd, iCol, pcol)
#define IDC_DEVICE_EXCLUSIVE
#define IDS_MULTI_SZ_EMPTY_STRING
LONG WINAPI RegOpenKeyW(HKEY hKey, LPCWSTR lpSubKey, PHKEY phkResult)
#define IDS_MEMORY_READ_ONLY
#define CM_RESOURCE_MEMORY_READ_ONLY
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@379::@385 Dma
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)
#define IDD_EDIT_RESOURCE_LIST
int _snwprintf(wchar_t *buffer, size_t count, const wchar_t *format,...)
static void error_code_messagebox(HWND hwnd, DWORD error_code)
#define IDS_MEMORY_LENGTH
LRESULT CALLBACK DwordEditSubclassProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
#define REG_RESOURCE_LIST
#define REG_FULL_RESOURCE_DESCRIPTOR
BOOL ModifyValue(HWND hwnd, HKEY hKey, LPCWSTR valueName, BOOL EditBin)
#define DialogBoxW(i, t, p, f)
_Must_inspect_result_ _In_ WDFKEY _In_ PCUNICODE_STRING _Out_opt_ PUSHORT _Inout_opt_ PUNICODE_STRING Value
static PCM_RESOURCE_LIST resourceValueData
#define REG_OPTION_NON_VOLATILE
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
#define ListView_SetItemText(hwndLV, i, iSubItem_, pszText_)
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)
int WINAPI MessageBoxW(_In_opt_ HWND, _In_opt_ LPCWSTR, _In_opt_ LPCWSTR, _In_ UINT)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
static DWORD DWORD * dwLength
#define IDS_TOO_BIG_VALUE
#define IDS_QUERY_DELETE_KEY_CONFIRM
static VOID AddFullResourcesToList(HWND hwnd)
struct _CM_PARTIAL_RESOURCE_DESCRIPTOR::@379::@388 DeviceSpecificData
#define IDS_QUERY_DELETE_KEY_ONE
#define ListView_SetExtendedListViewStyle(hwndLV, dw)
#define IDS_INTERRUPT_EDGE_SENSITIVE
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
#define IDC_INTERFACETYPE
#define IDS_MEMORY_ACCESS
#define HexEdit_LoadBuffer(hWnd, Buffer, Size)
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1]
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
BOOL WINAPI SetDlgItemInt(_In_ HWND, _In_ int, _In_ UINT, _In_ BOOL)
#define IDC_SHOW_RESOURCE
LONG QueryStringValue(HKEY hKey, LPCWSTR lpSubKey, LPCWSTR lpValueName, LPWSTR pszBuffer, DWORD dwBufferLen)
#define IDS_INTERRUPT_LEVEL_SENSITIVE
#define memcpy(s1, s2, n)
union _CM_PARTIAL_RESOURCE_DESCRIPTOR::@379 u
int _cdecl swprintf(const WCHAR *,...)
#define IDC_DRIVER_EXCLUSIVE
INT_PTR CALLBACK modify_string_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
INTERFACE_TYPE InterfaceType
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LRESULT(CALLBACK * WNDPROC)(HWND, UINT, WPARAM, LPARAM)
#define IDS_BUS_PNPISABUS
_Check_return_ _CRTIMP int __cdecl iscntrl(_In_ int _C)
INT_PTR CALLBACK modify_binary_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define IDS_INTERRUPT_TYPE
#define HexEdit_CopyBuffer(hWnd, Buffer, nMax)
#define IDD_EDIT_MULTI_STRING
static LONG MoveKey(HKEY hDestKey, LPCWSTR lpDestSubKey, HKEY hSrcKey, LPCWSTR lpSrcSubKey)
_CRTIMP int __cdecl _vsnwprintf(wchar_t *_Dest, size_t _Count, const wchar_t *_Format, va_list _Args)
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
static BOOL CreateResourceColumns(HWND hwnd)
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
#define CM_RESOURCE_PORT_IO
struct tagNMLISTVIEW * LPNMLISTVIEW
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static BOOL OnResourceListNotify(HWND hwndDlg, NMHDR *phdr)
BOOL DeleteKey(HWND hwnd, HKEY hKeyRoot, LPCWSTR keyPath)
_CRTIMP wchar_t *__cdecl wcscat(_Inout_updates_z_(_String_length_(_Dest)+_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
#define IDS_SPECIFIC_RESERVED2
#define IDS_BUS_PROCESSORINTERNAL
static WCHAR * stringValueData
#define CmResourceTypeInterrupt
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
#define IDS_BUS_MICROCHANNEL
#define IDS_BUS_UNDEFINED
#define IDS_SPECIFIC_RESERVED1
static VOID ParseResources(HWND hwnd)
static BOOL OnResourceNotify(HWND hwndDlg, NMHDR *phdr)
#define ListView_GetItem(hwnd, pitem)
void int int ULONGLONG int va_list * ap
#define CM_RESOURCE_INTERRUPT_LATCHED
#define IDS_UNSUPPORTED_TYPE
LRESULT WINAPI CallWindowProcW(_In_ WNDPROC, _In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDS_INTERRUPT_AFFINITY
#define GetWindowTextLength
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
INT_PTR CALLBACK modify_dword_dlgproc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
BOOL WINAPI CheckRadioButton(_In_ HWND, _In_ int, _In_ int, _In_ int)
#define HKEY_CLASSES_ROOT
#define IDS_BUS_INTERNALPOWERBUS
#define MAKEINTRESOURCEW(i)
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)
GLuint GLuint GLsizei GLenum type
#define IDS_BUS_PCMCIABUS
void warning(HWND hwnd, INT resId,...)
#define IDS_MEMORY_ADDRESS
#define CmResourceTypeMemory
#define IDS_INTERRUPT_LEVEL
#define IDS_BUS_UNKNOWNTYPE
static BOOL CreateResourceListColumns(HWND hWndListView)
const char * errstr(int errcode)
#define IDC_RESOURCE_LIST
#define HeapFree(x, y, z)
#define RegCloseKey(hKey)
static DWORD dwordValueData
_Must_inspect_result_ _In_ WDFDEVICE _In_ LPCGUID InterfaceType
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
#define IDS_MEMORY_WRITE_ONLY
#define CmResourceTypeDma
_In_ LARGE_INTEGER _Out_opt_ PLARGE_INTEGER Remainder
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
#define HKEY_LOCAL_MACHINE
#define HexEdit_GetBufferSize(hWnd)
BOOL GetKeyName(LPWSTR pszDest, size_t iDestLength, HKEY hRootKey, LPCWSTR lpSubKey)