Export (0) Print
Expand All
Expand Minimize

PdhCloseLog function

Closes the specified log file.

Syntax


PDH_STATUS PdhCloseLog(
  _In_ PDH_HLOG hLog,
  _In_ DWORD    dwFlags
);

Parameters

hLog [in]

Handle to the log file to be closed. This handle is returned by the PdhOpenLog function.

dwFlags [in]

You can specify the following flag.

ValueMeaning
PDH_FLAGS_CLOSE_QUERY

Closes the query associated with the specified log file handle. See the hQuery parameter of PdhOpenLog.

 

Return value

If the function succeeds, it returns ERROR_SUCCESS and closes and deletes the query.

If the function fails, the return value is a system error code or a PDH error code. The following is a possible value.

Return codeDescription
PDH_INVALID_HANDLE

The log file handle is not valid.

 

Examples

For an example, see Writing Performance Data to a Log File.

Requirements

Minimum supported client

Windows XP [desktop apps only]

Minimum supported server

Windows Server 2003 [desktop apps only]

Header

Pdh.h

Library

Pdh.lib

DLL

Pdh.dll

See also

PdhOpenLog
PdhBindInputDataSource

 

 

Community Additions

ADD
Show:
© 2015 Microsoft