Redigera

Dela via


EvtSetChannelConfigProperty function (winevt.h)

Sets the specified configuration property of a channel.

Syntax

BOOL EvtSetChannelConfigProperty(
  [in] EVT_HANDLE                     ChannelConfig,
  [in] EVT_CHANNEL_CONFIG_PROPERTY_ID PropertyId,
  [in] DWORD                          Flags,
  [in] PEVT_VARIANT                   PropertyValue
);

Parameters

[in] ChannelConfig

A handle to the channel's configuration properties that the EvtOpenChannelConfig function returns.

[in] PropertyId

The identifier of the channel property to set. For a list of property identifiers, see the EVT_CHANNEL_CONFIG_PROPERTY_ID enumeration.

[in] Flags

Reserved. Must be zero.

[in] PropertyValue

The property value to set.

A caller-allocated buffer that contains the new configuration property value. The buffer contains an EVT_VARIANT object. Be sure to set the configuration value and variant type.

Return value

Return code/value Description
TRUE
The function succeeded.
FALSE
The function failed. To get the error code, call the GetLastError function.

Remarks

This function changes an in-memory copy of the configuration properties. To apply the changes that you have made to one or more of the configuration properties, call the EvtSaveChannelConfig function.

Examples

For an example that shows how to use this function, see Getting and Setting a Channel's Configuration Properties.

Requirements

Requirement Value
Minimum supported client Windows Vista [desktop apps only]
Minimum supported server Windows Server 2008 [desktop apps only]
Target Platform Windows
Header winevt.h
Library Wevtapi.lib
DLL Wevtapi.dll

See also

EvtGetChannelConfigProperty

EvtOpenChannelConfig

EvtSaveChannelConfig