IWMDMLogger interface (wmdmlog.h)

The IWMDMLogger interface is used by Windows Media Device Manager applications and service providers to log entries in a common log file. Components do not need to be certified to use this object.

This interface is exposed by a COM object that must be created using the class ID CLSID_WMDMLogger, as shown here:

IWMDMLogger* m_pLogger = NULL;
CoCreateInstance(CLSID_WMDMLogger, NULL, CLSCTX_ALL, __uuidof(IWMDMLogger), (void**)&m_pLogger);

This interface GUID is not properly defined in mssachlp.lib; therefore, to get the proper definitions when implementing this interface, you must #include both mswmdm.h and wmdmlog_i.c from wmdmlog.idl.


The IWMDMLogger interface inherits from the IUnknown interface. IWMDMLogger also has these types of members:


The IWMDMLogger interface has these methods.


The Enable method enables or disables logging. Logging is enabled by default.

The GetLogFileName method returns the full path to the current log file.

The GetSizeParams method retrieves the current size parameters of the current log file.

The IsEnabled method determines whether logging is enabled.

The LogDword method logs a DWORD value to the current log file. A carriage return and line feed are added to each log entry.

The LogString method logs a string to the current log file. A carriage return and line feed are added to each log entry.

The Reset method deletes the contents of the current log file.

The SetLogFileName method sets the full path to the current log file. All subsequent log entries will be placed in this file.

The SetSizeParams method sets the current size parameters for the current log file.


Target Platform Windows
Header wmdmlog.h

See also

Enabling Logging

Interfaces for Service Providers and Applications