719 B
719 B
PnpMessage
A PNPMESSAGE is a device discovery message that a discovery adapter will report to the Bridge using the DiscoveryAdapter_ReportDevice. The discovery adapter should use PnpMessage_CreateMessage to allocate this message followed by PnpMessage_SetMessage to set the message payload.
Charactersitics of PnpMessage
- A PnpMessage is backed by PnpMemory which is ref counted
- PnpMessage properties allow for specifying a context. This context is an arbitrary pointer and its lifetime should be
- When a discovery adapter reports a PnpMessage, it should ideally drop reference on that PnpMessage
- PnpBridge will take a reference and hold onto the message till a corresponding removal message is sent