ahmd0
ahmd0

Reputation: 17313

Is there an equivalent of System.Diagnostics.EventLog for C++?

I need to change the parameters of the Windows Event Log from a C++ code, and namely what is available via the System.Diagnostics.EventLog class in C#. I need to read and later possibly modify the following properties:

Upvotes: 0

Views: 315

Answers (2)

Sheng Jiang 蒋晟
Sheng Jiang 蒋晟

Reputation: 15281

You can write the setting to the registry

MaximumKilobytes->MaxSize

OverflowAction&MinimumRetentionDays->Retention

Upvotes: 1

detunized
detunized

Reputation: 15299

You can do that by getting and setting values in the registry. Microsoft has pretty detailed documentation on this one. You would be interested in MaxSize and Retention values.

Upvotes: 0

Related Questions