一个怪问题,是关于Computer System Hardware Classes的,可不好回答哟!
MSDN中有一些特殊的类,下面的类可以获取IDE设备的信息,现摘要描述一下:
Win32_IDEController
The Win32_IDEController WMI class manages the capabilities of an IDE controller device.
The following syntax is simplified from MOF code and includes all inherited properties.
class Win32_IDEController : CIM_Controller
{
......
};
Remarks
The Win32_IDEController class is derived from CIM_Controller.
Requirements
Windows NT/2000/XP: Requires Windows NT 4.0 SP4 or later
Namespace: Included in \root\cimv2
MOF: Declared in cimwin32a_V2_desc.mof
********
* 参考 * 由 “acptvb(微软亚洲技术中心 VB技术支持)” 提供
********
如果用VB,微软提供下列方式获取信息:
Computer = "MyMachineName"
Set SCSIs = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & Computer & "\root\cimv2").ExecQuery("Select * From Win32_SCSIController")
For Each mycard In SCSIs
MsgBox mycard.DeviceID
Next
********
* 问题 *
********
请问谁有方法在VC中访问这种类型的类?即获得上面VB参考程序中的相同结果。
水平不行只能给100分