Hi Guys,<\/p>\n
I’ve run into a series of errors and I can’t figure out what’s causing them. The situation is this, I have two projects. Both projects compile fine separately. When I combine the files together I get a series of errors that don’t make sense. The error is: ‘Capabilities’ cannot expose type ‘NativeTypes.DeviceCapabilityFlags’ outside the project through class ‘Device’.<\/p>\n
Here’s the offending code: There are others like this. Both the property and the enum are declared as public, so I’m at a lose as to what is causing the error. Any help you can provide is appreciated<\/p>","upvoteCount":1,"answerCount":1,"datePublished":"2025-05-22T23:28:40.737Z","author":{"@type":"Person","name":"vincentshanecurtis","url":"https://community.spiceworks.com/u/vincentshanecurtis"},"suggestedAnswer":[{"@type":"Answer","text":" Hi Guys,<\/p>\n I’ve run into a series of errors and I can’t figure out what’s causing them. The situation is this, I have two projects. Both projects compile fine separately. When I combine the files together I get a series of errors that don’t make sense. The error is: ‘Capabilities’ cannot expose type ‘NativeTypes.DeviceCapabilityFlags’ outside the project through class ‘Device’.<\/p>\n Here’s the offending code: There are others like this. Both the property and the enum are declared as public, so I’m at a lose as to what is causing the error. Any help you can provide is appreciated<\/p>","upvoteCount":1,"datePublished":"2025-05-22T23:28:40.804Z","url":"https://community.spiceworks.com/t/assistance-with-errors/1208537/1","author":{"@type":"Person","name":"vincentshanecurtis","url":"https://community.spiceworks.com/u/vincentshanecurtis"}}]}}
Public ReadOnly Property Capabilities() As DeviceCapabilityFlags Get Try Return DirectCast(GetIntegerProperty(DevicePropertyID.Capabilities), DeviceCapabilityFlags) Catch Return Nothing End Try End Get End Property<\/code><\/p>\n
Public Enum DeviceCapabilityFlags As Integer\n LOCKSUPPORTED = &H1\n EJECTSUPPORTED = &H2\n REMOVABLE = &H4\n DOCKDEVICE = &H8\n UNIQUEID = &H10\n SILENTINSTALL = &H20\n RAWDEVICEOK = &H40\n SURPRISEREMOVALOK = &H80\n HARDWAREDISABLED = &H100\n NONDYNAMIC = &H200\n End Enum\n\n<\/code><\/pre>\n
Public ReadOnly Property Capabilities() As DeviceCapabilityFlags Get Try Return DirectCast(GetIntegerProperty(DevicePropertyID.Capabilities), DeviceCapabilityFlags) Catch Return Nothing End Try End Get End Property<\/code><\/p>\n
Public Enum DeviceCapabilityFlags As Integer\n LOCKSUPPORTED = &H1\n EJECTSUPPORTED = &H2\n REMOVABLE = &H4\n DOCKDEVICE = &H8\n UNIQUEID = &H10\n SILENTINSTALL = &H20\n RAWDEVICEOK = &H40\n SURPRISEREMOVALOK = &H80\n HARDWAREDISABLED = &H100\n NONDYNAMIC = &H200\n End Enum\n\n<\/code><\/pre>\n