IControlChangeNotify::OnNotify method (devicetopology.h)

The OnNotify method notifies the client when the status of a connector or subunit changes.

Syntax

HRESULT OnNotify(
  [in] DWORD   dwSenderProcessId,
  [in] LPCGUID pguidEventContext
);

Parameters

[in] dwSenderProcessId

The process ID of the client that changed the state of the control. If a notification is generated by a hardware event, this process ID will differ from the client's process ID. For more information, see Remarks.

[in] pguidEventContext

A pointer to the context GUID for the control-change event. The client that initiates the control change supplies this GUID. For more information, see Remarks.

Return value

If the method succeeds, it returns S_OK. If it fails, it returns an error code.

Remarks

A client can use this method to keep track of control changes made by other processes and by the hardware. However, a client that changes a control setting can typically disregard the notification that the control change generates. In its implementation of the OnNotify method, a client can inspect the dwSenderProcessId and pguidEventContext parameters to discover whether it or another client is the source of the control-change event.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header devicetopology.h

See also

IControlChangeNotify Interface