//+---------------------------------------------------------------------------- // // Copyright (C) 1999, Microsoft Corporation // // File: log.cxx // // Contents: Event logging for Dfs service // // Functions: // // History: 2-1-99 Jharper created // //----------------------------------------------------------------------------- #include #pragma hdrstop extern "C" { #include #include #include #include #include } 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); } }