Share via


DeviceManager.UnregisterPersistentEvent method

Unregisters the specified Command for the specified EventID for the specified DeviceID. UnregisterPersistentEvent should only be called for the Command, Name, Description, Icon, EventID, and DeviceID for which you called RegisterPersistentEvent.

Syntax

DeviceManager.UnregisterPersistentEvent( _
  ByVal Command As BSTR, _
  ByVal Name As BSTR, _
  ByVal Description As BSTR, _
  ByVal Icon As BSTR, _
  ByVal EventID As BSTR, _
  [ ByVal DeviceID As BSTR ] _
) As HRESULT

Parameters

Command [in]

Type: BSTR

Required. String value.

Name [in]

Type: BSTR

Required. String value.

Description [in]

Type: BSTR

Required. String value.

Icon [in]

Type: BSTR

Required. String value.

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

For example code, see Implement a Windows Script Host Script that Runs Automatically in Shared Samples.

The UnregisterPersistentEvent method requires Administrator permission to function successfully.

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)

Description (DeviceCommand)

Name (DeviceCommand)

Description (DeviceEvent)

EventID

Name (DeviceEvent)

DeviceID (DeviceInfo)

DeviceManager

OnEvent

RegisterEvent

RegisterPersistentEvent

UnregisterEvent

EventID Constants

Description (Filter)

Name (Filter)

Description (FilterInfo)

Name (FilterInfo)

Add (Items)

Name (Property)