[DEVMGR] Implement the Resources By Type view

TODO:
- Add resource type icon
- Fix the context menu
This commit is contained in:
Eric Kohl 2025-06-19 22:32:28 +02:00
parent 59e556f3f3
commit 87d2179956
42 changed files with 744 additions and 156 deletions

View file

@ -19,6 +19,8 @@ list(APPEND SOURCE
devmgmt/DeviceView.cpp
devmgmt/MainWindow.cpp
devmgmt/Node.cpp
devmgmt/ResourceNode.cpp
devmgmt/ResourceTypeNode.cpp
devmgmt/RootNode.cpp)
add_library(devmgr MODULE

View file

@ -394,6 +394,26 @@ CDeviceNode::UninstallDevice()
return true;
}
bool
CDeviceNode::HasResources()
{
HKEY hKey = NULL;
DWORD dwError, dwSize = 0;
CStringW keyName = L"SYSTEM\\CurrentControlSet\\Enum\\";
keyName += m_DeviceId;
keyName += L"\\Control";
dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, keyName, 0, KEY_READ, &hKey);
if (dwError == ERROR_SUCCESS)
{
RegQueryValueExW(hKey, L"AllocConfig", NULL, NULL, NULL, &dwSize);
RegCloseKey(hKey);
}
return (dwSize != 0);
}
/* PRIVATE METHODS ******************************************************/
void

View file

@ -53,6 +53,9 @@ public:
bool UninstallDevice(
);
bool HasResources(
);
private:
void Cleanup(
);

View file

@ -9,10 +9,10 @@
#include "precomp.h"
#include "restypes.h"
#include "devmgmt.h"
#include "DeviceView.h"
// DATA ********************************************/
#define CLASS_NAME_LEN 256
@ -426,6 +426,7 @@ unsigned int __stdcall CDeviceView::RefreshThread(void *Param)
break;
case ResourcesByType:
(VOID)This->ListResourcesByType();
break;
case ResourcesByConnection:
@ -586,6 +587,180 @@ CDeviceView::ListDevicesByConnection()
return true;
}
bool
CDeviceView::ListResourcesByType()
{
HTREEITEM hMemoryTreeItem = NULL;
HTREEITEM hPortTreeItem = NULL;
HTREEITEM hDmaTreeItem = NULL;
HTREEITEM hIrqTreeItem = NULL;
CResourceTypeNode *MemoryNode = new CResourceTypeNode(IDS_TYPE_MEMORY, &m_ImageListData);
hMemoryTreeItem = InsertIntoTreeView(m_hTreeRoot,
MemoryNode);
CResourceTypeNode *PortNode = new CResourceTypeNode(IDS_TYPE_PORT, &m_ImageListData);
hPortTreeItem = InsertIntoTreeView(m_hTreeRoot,
PortNode);
CResourceTypeNode *DmaNode = new CResourceTypeNode(IDS_TYPE_DMA, &m_ImageListData);
hDmaTreeItem = InsertIntoTreeView(m_hTreeRoot,
DmaNode);
CResourceTypeNode *IrqNode = new CResourceTypeNode(IDS_TYPE_IRQ, &m_ImageListData);
hIrqTreeItem = InsertIntoTreeView(m_hTreeRoot,
IrqNode);
// Walk the device tree and add all the resources
(void)RecurseResources(m_RootNode->GetDeviceInst(),
hMemoryTreeItem,
hPortTreeItem,
hDmaTreeItem,
hIrqTreeItem);
// Sort the resource types alphabetically
(void)TreeView_SortChildren(m_hTreeView,
m_hTreeRoot,
0);
// Expand the root item
(void)TreeView_Expand(m_hTreeView,
m_hTreeRoot,
TVE_EXPAND);
return true;
}
bool
CDeviceView::RecurseResources(
_In_ DEVINST ParentDevice,
_In_ HTREEITEM hMemoryTreeItem,
_In_ HTREEITEM hPortTreeItem,
_In_ HTREEITEM hDmaTreeItem,
_In_ HTREEITEM hIrqTreeItem
)
{
DEVINST Device;
bool bSuccess;
ULONG Index;
// Check if the parent has any child devices
if (GetChildDevice(ParentDevice, &Device) == FALSE)
return true;
// Get the cached device node
CDeviceNode *DeviceNode;
DeviceNode = dynamic_cast<CDeviceNode *>(GetDeviceNode(Device));
if (DeviceNode == nullptr)
{
return false;
}
PCM_RESOURCE_LIST pResourceList = (PCM_RESOURCE_LIST)GetResourceList(DeviceNode->GetDeviceId());
if (pResourceList)
{
for (Index = 0; Index < pResourceList->List[0].PartialResourceList.Count; Index++)
{
PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor = &pResourceList->List[0].PartialResourceList.PartialDescriptors[Index];
if (Descriptor->Type == CmResourceTypeInterrupt)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hIrqTreeItem, resNode);
}
else if (Descriptor->Type == CmResourceTypePort)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hPortTreeItem, resNode);
}
else if (Descriptor->Type == CmResourceTypeMemory)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hMemoryTreeItem, resNode);
}
else if (Descriptor->Type == CmResourceTypeDma)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hDmaTreeItem, resNode);
}
}
HeapFree(GetProcessHeap(), 0, pResourceList);
}
RecurseResources(Device, hMemoryTreeItem, hPortTreeItem, hDmaTreeItem, hIrqTreeItem);
// Check for siblings
for (;;)
{
// Check if the parent device has anything at the same level
bSuccess = GetSiblingDevice(Device, &Device);
if (bSuccess == FALSE)
break;
DeviceNode = dynamic_cast<CDeviceNode *>(GetDeviceNode(Device));
if (DeviceNode == nullptr)
{
continue;
}
PCM_RESOURCE_LIST pResourceList = (PCM_RESOURCE_LIST)GetResourceList(DeviceNode->GetDeviceId());
if (pResourceList)
{
for (Index = 0; Index < pResourceList->List[0].PartialResourceList.Count; Index++)
{
PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor = &pResourceList->List[0].PartialResourceList.PartialDescriptors[Index];
if (Descriptor->Type == CmResourceTypeInterrupt)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hIrqTreeItem, resNode);
}
else if (Descriptor->Type == CmResourceTypePort)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hPortTreeItem, resNode);
}
else if (Descriptor->Type == CmResourceTypeMemory)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hMemoryTreeItem, resNode);
}
else if (Descriptor->Type == CmResourceTypeDma)
{
CResourceNode *resNode = new CResourceNode(DeviceNode, Descriptor, &m_ImageListData);
InsertIntoTreeView(hDmaTreeItem, resNode);
}
}
HeapFree(GetProcessHeap(), 0, pResourceList);
}
RecurseResources(Device, hMemoryTreeItem, hPortTreeItem, hDmaTreeItem, hIrqTreeItem);
}
(void)TreeView_SortChildren(m_hTreeView,
hMemoryTreeItem,
0);
(void)TreeView_SortChildren(m_hTreeView,
hPortTreeItem,
0);
(void)TreeView_SortChildren(m_hTreeView,
hIrqTreeItem,
0);
(void)TreeView_SortChildren(m_hTreeView,
hDmaTreeItem,
0);
return true;
}
bool
CDeviceView::RecurseChildDevices(
_In_ DEVINST ParentDevice,

View file

@ -2,6 +2,8 @@
#include "DeviceNode.h"
#include "ClassNode.h"
#include "RootNode.h"
#include "ResourceNode.h"
#include "ResourceTypeNode.h"
enum ViewType
{
@ -101,6 +103,16 @@ private:
);
bool ListDevicesByType(
);
bool ListResourcesByType(
);
bool RecurseResources(
_In_ DEVINST ParentDevice,
_In_ HTREEITEM hMemoryTreeItem,
_In_ HTREEITEM hPortTreeItem,
_In_ HTREEITEM hDmaTreeItem,
_In_ HTREEITEM hIrqTreeItem
);
bool GetNextClass(
_In_ ULONG ClassIndex,

View file

@ -630,6 +630,12 @@ CDeviceManager::OnCommand(_In_ WPARAM wParam,
break;
}
case IDM_RESBYTYPE:
{
RefreshView(ResourcesByType, false);
break;
}
case IDM_SHOWHIDDEN:
{
// Get the current state

View file

@ -6,7 +6,9 @@ enum NodeType
{
RootNode,
ClassNode,
DeviceNode
DeviceNode,
ResourceNode,
ResourceTypeNode
};
class CNode

View file

@ -0,0 +1,77 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/win32/devmgr/devmgmt/ResourceNode.cpp
* PURPOSE: Class object for
* COPYRIGHT: Copyright 2025 Eric Kohl <ekohl@reactos.org>
*
*/
#include "precomp.h"
#include "restypes.h"
#include "devmgmt.h"
#include "ResourceNode.h"
CResourceNode::CResourceNode(
_In_ CDeviceNode *Node,
_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor,
_In_ PSP_CLASSIMAGELIST_DATA ImageListData
) :
CNode(ResourceNode, ImageListData)
{
WCHAR szDetail[200];
WCHAR szDescription[100];
ULONG ulLength;
m_DeviceId = Node->GetDeviceId();
m_ClassImage = Node->GetClassImage();
ulLength = sizeof(szDescription);
CM_Get_DevNode_Registry_PropertyW(Node->GetDeviceInst(),
CM_DRP_DEVICEDESC,
NULL,
szDescription,
&ulLength,
0);
if (Descriptor->Type == CmResourceTypeInterrupt)
{
wsprintf(szDetail, L"(%s) 0x%08x (%d) %s",
(Descriptor->Flags & CM_RESOURCE_INTERRUPT_LATCHED) ? L"ISA" : L"PCI",
Descriptor->u.Interrupt.Level, Descriptor->u.Interrupt.Vector,
szDescription);
StringCchCopyW(m_DisplayName, MAX_PATH, szDetail);
}
else if (Descriptor->Type == CmResourceTypePort)
{
wsprintf(szDetail, L"[%08lx - %08lx] %s",
Descriptor->u.Port.Start.LowPart, Descriptor->u.Port.Start.LowPart + Descriptor->u.Port.Length - 1,
szDescription);
StringCchCopyW(m_DisplayName, MAX_PATH, szDetail);
}
else if (Descriptor->Type == CmResourceTypeMemory)
{
wsprintf(szDetail, L"[%08I64x - %08I64x] %s",
Descriptor->u.Memory.Start.QuadPart, Descriptor->u.Memory.Start.QuadPart + Descriptor->u.Memory.Length - 1,
szDescription);
StringCchCopyW(m_DisplayName, MAX_PATH, szDetail);
}
else if (Descriptor->Type == CmResourceTypeDma)
{
wsprintf(szDetail, L"%08ld %s", Descriptor->u.Dma.Channel, szDescription);
StringCchCopyW(m_DisplayName, MAX_PATH, szDetail);
}
}
CResourceNode::~CResourceNode()
{
}
bool
CResourceNode::SetupNode()
{
return true;
}

View file

@ -0,0 +1,20 @@
#pragma once
#include "Node.h"
#include "DeviceNode.h"
#include "restypes.h"
class CResourceNode : public CNode
{
public:
CResourceNode(
_In_ CDeviceNode *Node,
_In_ PCM_PARTIAL_RESOURCE_DESCRIPTOR Descriptor,
_In_ PSP_CLASSIMAGELIST_DATA ImageListData
);
~CResourceNode();
virtual bool SetupNode();
};

View file

@ -0,0 +1,36 @@
/*
* PROJECT: ReactOS Device Manager
* LICENSE: GPL - See COPYING in the top level directory
* FILE: dll/win32/devmgr/devmgmt/ResourceTypeNode.cpp
* PURPOSE: Class object for
* COPYRIGHT: Copyright 2025 Eric Kohl <ekohl@reactos.org>
*
*/
#include "precomp.h"
#include "devmgmt.h"
#include "ResourceTypeNode.h"
CResourceTypeNode::CResourceTypeNode(
_In_ UINT ResId,
_In_ PSP_CLASSIMAGELIST_DATA ImageListData
) :
CNode(ResourceTypeNode, ImageListData)
{
CAtlStringW str;
if (str.LoadStringW(g_hThisInstance, ResId))
StringCchCopyW(m_DisplayName, MAX_PATH, str.GetBuffer());
}
CResourceTypeNode::~CResourceTypeNode()
{
}
bool
CResourceTypeNode::SetupNode()
{
return true;
}

View file

@ -0,0 +1,17 @@
#pragma once
#include "Node.h"
class CResourceTypeNode : public CNode
{
public:
CResourceTypeNode(
_In_ UINT ResId,
_In_ PSP_CLASSIMAGELIST_DATA ImageListData
);
~CResourceTypeNode();
virtual bool SetupNode();
};

View file

@ -0,0 +1,154 @@
#pragma once
/* Physical Addresses are always treated as 64-bit wide */
typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
#include <pshpack4.h>
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
UCHAR Type;
UCHAR ShareDisposition;
USHORT Flags;
union {
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Generic;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Port;
struct {
#if defined(NT_PROCESSOR_GROUPS)
USHORT Level;
USHORT Group;
#else
ULONG Level;
#endif
ULONG Vector;
KAFFINITY Affinity;
} Interrupt;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
struct {
union {
struct {
#if defined(NT_PROCESSOR_GROUPS)
USHORT Group;
#else
USHORT Reserved;
#endif
USHORT MessageCount;
ULONG Vector;
KAFFINITY Affinity;
} Raw;
struct {
#if defined(NT_PROCESSOR_GROUPS)
USHORT Level;
USHORT Group;
#else
ULONG Level;
#endif
ULONG Vector;
KAFFINITY Affinity;
} Translated;
} DUMMYUNIONNAME;
} MessageInterrupt;
#endif
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Memory;
struct {
ULONG Channel;
ULONG Port;
ULONG Reserved1;
} Dma;
struct {
ULONG Data[3];
} DevicePrivate;
struct {
ULONG Start;
ULONG Length;
ULONG Reserved;
} BusNumber;
struct {
ULONG DataSize;
ULONG Reserved1;
ULONG Reserved2;
} DeviceSpecificData;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
struct {
PHYSICAL_ADDRESS Start;
ULONG Length40;
} Memory40;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length48;
} Memory48;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length64;
} Memory64;
#endif
} u;
} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
#include <poppack.h>
typedef struct _CM_PARTIAL_RESOURCE_LIST {
USHORT Version;
USHORT Revision;
ULONG Count;
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
#define CmResourceTypeNull 0
#define CmResourceTypePort 1
#define CmResourceTypeInterrupt 2
#define CmResourceTypeMemory 3
#define CmResourceTypeDma 4
#define CmResourceTypeDeviceSpecific 5
#define CmResourceTypeBusNumber 6
#define CmResourceTypeNonArbitrated 128
#define CmResourceTypeConfigData 128
#define CmResourceTypeDevicePrivate 129
#define CmResourceTypePcCardConfig 130
#define CmResourceTypeMfCardConfig 131
#define CM_RESOURCE_INTERRUPT_LEVEL_SENSITIVE 0x0000
#define CM_RESOURCE_INTERRUPT_LATCHED 0x0001
typedef enum _INTERFACE_TYPE {
InterfaceTypeUndefined = -1,
Internal,
Isa,
Eisa,
MicroChannel,
TurboChannel,
PCIBus,
VMEBus,
NuBus,
PCMCIABus,
CBus,
MPIBus,
MPSABus,
ProcessorInternal,
InternalPowerBus,
PNPISABus,
PNPBus,
Vmcs,
MaximumInterfaceType
} INTERFACE_TYPE, *PINTERFACE_TYPE;
typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
INTERFACE_TYPE InterfaceType;
ULONG BusNumber;
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
typedef struct _CM_RESOURCE_LIST {
ULONG Count;
CM_FULL_RESOURCE_DESCRIPTOR List[1];
} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
PVOID
GetResourceList(
LPWSTR pszDeviceID);

View file

@ -315,6 +315,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -319,6 +319,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Odinstalovat"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -274,7 +274,7 @@ BEGIN
BEGIN
MENUITEM "Geräte nach &Typ", IDM_DEVBYTYPE
MENUITEM "Garäte nach &Verbindung", IDM_DEVBYCONN
MENUITEM "Ressourcen nac&h Typ", IDM_RESBYTYPE, GRAYED
MENUITEM "Ressourcen nac&h Typ", IDM_RESBYTYPE
MENUITEM "Ressourcen nach V&erbindung", IDM_RESBYCONN, GRAYED
MENUITEM SEPARATOR
MENUITEM "Ausgeblendete &Geräte anzeigen", IDM_SHOWHIDDEN
@ -315,6 +315,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Deinstallieren"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Arbeitsspeicher"
IDS_TYPE_PORT "Ein-/Ausgabe (E/A)"
IDS_TYPE_DMA "Direkter Speicherzugriff (DMA)"
IDS_TYPE_IRQ "Interruptanfrage (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -273,7 +273,7 @@ BEGIN
BEGIN
MENUITEM "D&evices by type", IDM_DEVBYTYPE
MENUITEM "De&vices by connection", IDM_DEVBYCONN
MENUITEM "Resources by t&ype", IDM_RESBYTYPE, GRAYED
MENUITEM "Resources by t&ype", IDM_RESBYTYPE
MENUITEM "Resources by co&nnection", IDM_RESBYCONN, GRAYED
MENUITEM SEPARATOR
MENUITEM "Sho&w hidden devices", IDM_SHOWHIDDEN
@ -314,6 +314,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -323,6 +323,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Desinstalar"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -321,6 +321,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Desinstalli"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -315,6 +315,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Désinstaller"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -315,6 +315,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Eltávolítás"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Bongkar"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -314,6 +314,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "アンインストール"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -325,6 +325,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Odinstaluj"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -314,6 +314,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Desinstalar"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -323,6 +323,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Dezinstalează"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Удалить"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -319,6 +319,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -318,6 +318,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -316,6 +316,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Kaldır"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -322,6 +322,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "Uninstall"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -323,6 +323,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "卸载"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -322,6 +322,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "解除安裝"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -322,6 +322,14 @@ BEGIN
IDS_TOOLTIP_UNINSTALL "解除安裝"
END
STRINGTABLE
BEGIN
IDS_TYPE_MEMORY "Memory"
IDS_TYPE_PORT "Input/output (IO)"
IDS_TYPE_DMA "Direct Memory Access (DMA)"
IDS_TYPE_IRQ "Interrupt request (IRQ)"
END
/* Hints */
STRINGTABLE
BEGIN

View file

@ -78,6 +78,6 @@ OUT LPDWORD lpReboot);
#define DYNAMIC_FIELD_OFFSET(Type, Field) ((LONG)(LONG_PTR)&(((Type*) 0)->Field))
//WINE_DEFAULT_DEBUG_CHANNEL(devmgr);
WINE_DEFAULT_DEBUG_CHANNEL(devmgr);
#endif

View file

@ -8,7 +8,9 @@
*/
#include "precomp.h"
#include "restypes.h"
#include "properties.h"
#include "resource.h"
@ -20,151 +22,6 @@ typedef struct
}HARDWARE_RESOURCE_DATA, *PHARDWARE_RESOURCE_DATA;
/* Physical Addresses are always treated as 64-bit wide */
typedef LARGE_INTEGER PHYSICAL_ADDRESS, *PPHYSICAL_ADDRESS;
#include <pshpack4.h>
typedef struct _CM_PARTIAL_RESOURCE_DESCRIPTOR {
UCHAR Type;
UCHAR ShareDisposition;
USHORT Flags;
union {
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Generic;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Port;
struct {
#if defined(NT_PROCESSOR_GROUPS)
USHORT Level;
USHORT Group;
#else
ULONG Level;
#endif
ULONG Vector;
KAFFINITY Affinity;
} Interrupt;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
struct {
union {
struct {
#if defined(NT_PROCESSOR_GROUPS)
USHORT Group;
#else
USHORT Reserved;
#endif
USHORT MessageCount;
ULONG Vector;
KAFFINITY Affinity;
} Raw;
struct {
#if defined(NT_PROCESSOR_GROUPS)
USHORT Level;
USHORT Group;
#else
ULONG Level;
#endif
ULONG Vector;
KAFFINITY Affinity;
} Translated;
} DUMMYUNIONNAME;
} MessageInterrupt;
#endif
struct {
PHYSICAL_ADDRESS Start;
ULONG Length;
} Memory;
struct {
ULONG Channel;
ULONG Port;
ULONG Reserved1;
} Dma;
struct {
ULONG Data[3];
} DevicePrivate;
struct {
ULONG Start;
ULONG Length;
ULONG Reserved;
} BusNumber;
struct {
ULONG DataSize;
ULONG Reserved1;
ULONG Reserved2;
} DeviceSpecificData;
#if (NTDDI_VERSION >= NTDDI_LONGHORN)
struct {
PHYSICAL_ADDRESS Start;
ULONG Length40;
} Memory40;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length48;
} Memory48;
struct {
PHYSICAL_ADDRESS Start;
ULONG Length64;
} Memory64;
#endif
} u;
} CM_PARTIAL_RESOURCE_DESCRIPTOR, *PCM_PARTIAL_RESOURCE_DESCRIPTOR;
#include <poppack.h>
typedef struct _CM_PARTIAL_RESOURCE_LIST {
USHORT Version;
USHORT Revision;
ULONG Count;
CM_PARTIAL_RESOURCE_DESCRIPTOR PartialDescriptors[1];
} CM_PARTIAL_RESOURCE_LIST, *PCM_PARTIAL_RESOURCE_LIST;
#define CmResourceTypeNull 0
#define CmResourceTypePort 1
#define CmResourceTypeInterrupt 2
#define CmResourceTypeMemory 3
#define CmResourceTypeDma 4
#define CmResourceTypeDeviceSpecific 5
#define CmResourceTypeBusNumber 6
#define CmResourceTypeNonArbitrated 128
#define CmResourceTypeConfigData 128
#define CmResourceTypeDevicePrivate 129
#define CmResourceTypePcCardConfig 130
#define CmResourceTypeMfCardConfig 131
typedef enum _INTERFACE_TYPE {
InterfaceTypeUndefined = -1,
Internal,
Isa,
Eisa,
MicroChannel,
TurboChannel,
PCIBus,
VMEBus,
NuBus,
PCMCIABus,
CBus,
MPIBus,
MPSABus,
ProcessorInternal,
InternalPowerBus,
PNPISABus,
PNPBus,
Vmcs,
MaximumInterfaceType
} INTERFACE_TYPE, *PINTERFACE_TYPE;
typedef struct _CM_FULL_RESOURCE_DESCRIPTOR {
INTERFACE_TYPE InterfaceType;
ULONG BusNumber;
CM_PARTIAL_RESOURCE_LIST PartialResourceList;
} CM_FULL_RESOURCE_DESCRIPTOR, *PCM_FULL_RESOURCE_DESCRIPTOR;
typedef struct _CM_RESOURCE_LIST {
ULONG Count;
CM_FULL_RESOURCE_DESCRIPTOR List[1];
} CM_RESOURCE_LIST, *PCM_RESOURCE_LIST;
#define CX_TYPECOLUMN_WIDTH 120

View file

@ -1,8 +1,6 @@
#ifndef __DEVMGR_H
#define __DEVMGR_H
WINE_DEFAULT_DEBUG_CHANNEL(devmgr);
extern HINSTANCE hDllInstance;
typedef INT_PTR (WINAPI *PPROPERTYSHEETW)(LPCPROPSHEETHEADERW);

View file

@ -90,10 +90,11 @@
#define IDS_HINT_SYS_MAXIMIZE 134
#define IDS_HINT_SYS_CLOSE 135
/* resource type strings */
#define IDS_TYPE_MEMORY 136
#define IDS_TYPE_PORT 137
#define IDS_TYPE_DMA 138
#define IDS_TYPE_IRQ 139