windows-nt/Source/XPSP1/NT/base/fs/dfs/dfsm/server/log.cxx

56 lines
1.1 KiB
C++
Raw Normal View History

2020-09-26 03:20:57 -05:00
//+----------------------------------------------------------------------------
//
// Copyright (C) 1999, Microsoft Corporation
//
// File: log.cxx
//
// Contents: Event logging for Dfs service
//
// Functions:
//
// History: 2-1-99 Jharper created
//
//-----------------------------------------------------------------------------
#include <headers.hxx>
#pragma hdrstop
extern "C" {
#include <stdio.h>
#include <windows.h>
#include <lm.h>
#include <lmwksta.h>
#include <malloc.h>
}
extern "C" VOID
LogWriteMessage(
ULONG UniqueErrorCode,
DWORD dwErr,
ULONG nStrings,
LPCWSTR *pwStr)
{
HANDLE h;
h = RegisterEventSource(NULL, L"DfsSvc");
if (h != NULL) {
ReportEvent(
h,
// EVENTLOG_ERROR_TYPE, // vs EVENTLOG_WARNING_TYPE, EVENTLOG_INFORMATION_TYPE
EVENTLOG_INFORMATION_TYPE,
0,
UniqueErrorCode,
NULL,
(USHORT)nStrings,
sizeof(dwErr),
pwStr,
&dwErr);
DeregisterEventSource(h);
}
}