OpenCBM
util.h
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version
5  * 2 of the License, or (at your option) any later version.
6  *
7  * Copyright 2004 Spiro Trikaliotis
8  *
9  */
10 
19 // Some macros for specifying time values in NT's 100 ns-epoch
21 
23 #define SECONDS(_x_) MILLISECONDS((_x_)*1000)
24 
26 #define MILLISECONDS(_x_) MICROSECONDS((_x_)*1000)
27 
29 #define MICROSECONDS(_x_) ((_x_) * 10)
30 
31 VOID LogError(IN PDEVICE_OBJECT Fdo, IN NTSTATUS ErrorCode,
32  const WCHAR *String1, const WCHAR *String2);
33 
35 #define LogErrorOnly(_Fdo_, _UniqueErrorValue_) \
36  LogError(_Fdo_, _UniqueErrorValue_, NULL, NULL)
37 
39 #define LogErrorString(_Fdo_, _UniqueErrorValue_, _String1_, _String2_) \
40  LogError(_Fdo_, _UniqueErrorValue_, _String1_, _String2_)
VOID LogError(IN PDEVICE_OBJECT Fdo, IN NTSTATUS ErrorCode, const WCHAR *String1, const WCHAR *String2)
Log an error entry in the system log.