DeviceManager.UnregisterEvent method

Unregisters the specified EventID for the specified DeviceID. UnregisterEvent should only be called for the EventID and DeviceID for which you called RegisterEvent.

Syntax

DeviceManager.UnregisterEvent( _
  ByVal EventID As BSTR, _
  [ ByVal DeviceID As BSTR ] _
) As HRESULT

Parameters

EventID [in]

Type: BSTR

Required. String value.

DeviceID [in, optional]

Type: BSTR

String value.

Value Meaning
*
Default.

Return value

Type: HRESULT

If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.

Remarks

Unlike UnregisterPersistentEvent, UnregisterEvent does not need to be called because all events are unregistered automatically when the application exits.

Requirements

Minimum supported client
Windows Vista [desktop apps only]
Minimum supported server
Windows Server 2003 R2 [desktop apps only]
Header
Wiaaut.h
IDL
Wiaaut.idl

See also

Reference

DeviceID (Device)

EventID

DeviceID (DeviceInfo)

DeviceManager

OnEvent

RegisterEvent

RegisterPersistentEvent

UnregisterPersistentEvent

EventID Constants