I am writing an application to record some hardware information of computers in our environment and I am unclear on an enum mapping from the Win32/CIM/WMI(?) API. I am getting VideoOutputTechnology from the root/wmi/wmimonitorconnectionparams
class using the Microsoft.Management.Infrastructure library. This value is UInt32 enum - the source is visible here.
I have successfully mapped most of this to a C# enum, but I am unclear on how I would write out the last five values (see below). Is it true that D3DKMDT_VOT_SVIDEO_4PIN = D3DKMDT_VOT_SVIDEO = 1?
D3DKMDT_VOT_SVIDEO = 1,
D3DKMDT_VOT_COMPOSITE_VIDEO = 2,
D3DKMDT_VOT_COMPONENT_VIDEO = 3,
// omitted for brevity
D3DKMDT_VOT_SVIDEO_4PIN = D3DKMDT_VOT_SVIDEO,
D3DKMDT_VOT_SVIDEO_7PIN = D3DKMDT_VOT_SVIDEO,
D3DKMDT_VOT_RF = D3DKMDT_VOT_COMPOSITE_VIDEO,
D3DKMDT_VOT_RCA_3COMPONENT = D3DKMDT_VOT_COMPONENT_VIDEO,
D3DKMDT_VOT_BNC = D3DKMDT_VOT_COMPONENT_VIDEO,
My version of this code looks similar to the following:
public enum WmiMonitorConnectionParamsVideoOutputTechnology : uint
{
SVideo = 1,
CompositeVideo = 2,
ComponentVideo = 3,
// Is this correct?
SVideo4Pin = WmiMonitorConnectionParamsVideoOutputTechnology.SVideo,
SVideo7Pin = WmiMonitorConnectionParamsVideoOutputTechnology.SVideo,
RF = WmiMonitorConnectionParamsVideoOutputTechnology.CompositeVideo,
RCA_3COMPONENT = WmiMonitorConnectionParamsVideoOutputTechnology.ComponentVideo,
BNC = WmiMonitorConnectionParamsVideoOutputTechnology.ComponentVideo,
}
I realize that this appears to be an Int32 type in this source code, but it's coming from CIM as UInt32. However, that does not change my question on mapping these enum values I found this information here.
Frankly, I'm not really sure what I'm looking at so I'm having trouble phrasing a question on Google to get the right answer.