Click here to Skip to main content
Click here to Skip to main content
Add your own
alternative version

Detect Driver

, , 10 Mar 2010 CPOL
This article is the continue of the previously posted article Hide Driver. Some methods to detect hidden files and processes are described in it
DetectDriverBin.zip
DetectDriverBin
DetectDriverBin
DetectDriver.sys
DetectDriverGUI.exe
HideDriver.sys
HideDriverGUI.exe
DetectDriverSrc.zip
DetectDriverSrc
DetectDriver
src
Common
DetectDriver
Makefile
Sources
DetectDriverGUI
GUI.APS
res
GUI.ico
GUI.manifest
GUIDoc.ico
TabBarCtrl.inl
drvCppLib
lib_copy
atlssup.obj
chkesp.obj
chkstk.obj
conv.lib
eh.lib
eh3valid.obj
enable.obj
exsup.obj
exsup2.obj
exsup3.obj
inp.obj
lldiv.obj
lldvrm.obj
llmul.obj
llrem.obj
llshl.obj
llshr.obj
longjmp.obj
matherr.obj
memccpy.obj
memchr.obj
memcmp.obj
memcpy.obj
memmove.obj
memset.obj
outp.obj
rtc.lib
sehprolg.obj
sehsupp.obj
setjmp.obj
setjmp3.obj
setjmpex.obj
strcat.obj
strchr.obj
strcmp.obj
strcspn.obj
strdup.obj
strlen.obj
strncat.obj
strncmp.obj
strncpy.obj
strnset.obj
strpbrk.obj
strrchr.obj
strrev.obj
strset.obj
strspn.obj
strstr.obj
tlssup.obj
tran.lib
ulldiv.obj
ulldvrm.obj
ullrem.obj
ullshr.obj
_memicmp.obj
_stricmp.obj
_strnicm.obj
MAKEFILE
Sources
drvCppLibTest
makefile
sources
drvSingleModeTest
Makefile
Sources
drvUtils
Makefile
Sources
HideDriver
Makefile
Sources
HideDriverGUI
GUI.APS
HideDriverGUI.idc
res
GUI.ico
GUI.manifest
GUIDoc.ico
TabBarCtrl.inl
STLPort
algorithm
BC50
bak
make_bc50.sh
README
using
bitset
cassert
cctype
cerrno
cfloat
climits
clocale
cmath
complex
config
new_compiler
configure
configure.in
README
stlconf.h.in
unconfigure
stlcomp.h.orig
stl_icc.h.orig
csetjmp
csignal
cstdarg
cstddef
cstdio
cstdlib
cstring
ctime
cwchar
cwctype
deque
export
export.sun
fstream
functional
hash_map
hash_set
iomanip
ios
iosfwd
iostream
istream
iterator
limits
list
locale
map
memory
new
numeric
old_hp
export
ostream
pthread_alloc
queue
rope
set
slist
sstream
stack
stdexcept
stdio_streambuf
stl
debug
wrappers
streambuf
string
strstream
using
cstring
export
fstream
h
iomanip
ios
iosfwd
iostream
istream
locale
ostream
sstream
streambuf
strstream
utility
valarray
vector
wrap_std
complex
export
fstream
h
iomanip
ios
iosfwd
iostream
istream
locale
ostream
sstream
streambuf
strstream
xstring_
Utils
UtilsPortable
UtilsPortableUnitTest
/*
 * Copyright (c) 1999 
 * Boris Fomitchev
 *
 * This material is provided "as is", with absolutely no warranty expressed
 * or implied. Any use is at your own risk.
 *
 * Permission to use or copy this software for any purpose is hereby granted 
 * without fee, provided the above notices are retained on all copies.
 * Permission to modify the code and to distribute modified code is granted,
 * provided the above notices are retained, and a notice that the code was
 * modified is included with the above copyright notice.
 *
 */

#ifndef _STLP_CMATH_H_HEADER
# define _STLP_CMATH_H_HEADER

# include <cmath>

_STLP_BEGIN_NAMESPACE

# ifdef _STLP_SAME_FUNCTION_NAME_RESOLUTION_BUG

// this proxy is needed for some compilers to resolve problems
// calling sqrt() from within sqrt(), etc.
template <class _Tp>
struct _STL_math_proxy {
  static inline _Tp _do_abs(const _Tp& __x)     { return _STLP_VENDOR_CSTD::fabs(__x); } 
  static inline _Tp _do_acos(const _Tp& __x)    { return _STLP_VENDOR_CSTD::acos(__x); } 
  static inline _Tp _do_asin(const _Tp& __x)    { return _STLP_VENDOR_CSTD::asin(__x); } 
  static inline _Tp _do_atan(const _Tp& __x)    { return _STLP_VENDOR_CSTD::atan(__x); } 
  static inline _Tp _do_atan2(const _Tp& __x, const _Tp& __y)  { return _STLP_VENDOR_CSTD::atan2(__x, __y); } 
  static inline _Tp _do_cos(const _Tp& __x)     { return _STLP_VENDOR_CSTD::cos(__x); } 
  static inline _Tp _do_cosh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::cosh(__x); } 
  static inline _Tp _do_floor(const _Tp& __x)    { return _STLP_VENDOR_CSTD::floor(__x); } 
  static inline _Tp _do_ceil(const _Tp& __x)    { return _STLP_VENDOR_CSTD::ceil(__x); } 
  static inline _Tp _do_fmod(const _Tp& __x, const _Tp& __y)    { return _STLP_VENDOR_CSTD::fmod(__x, __y); } 
  static inline _Tp _do_frexp(const _Tp& __x, int* __y)    { return _STLP_VENDOR_CSTD::frexp(__x, __y); } 
  static inline _Tp _do_ldexp(const _Tp& __x, int __y)    { return _STLP_VENDOR_CSTD::ldexp(__x, __y); } 
  static inline _Tp _do_modf(const _Tp& __x, double* __y) { return _STLP_VENDOR_CSTD::modf(__x, __y); }
  static inline _Tp _do_log(const _Tp& __x)     { return _STLP_VENDOR_CSTD::log(__x); } 
  static inline _Tp _do_log10(const _Tp& __x)   { return _STLP_VENDOR_CSTD::log10(__x); } 
  static inline _Tp _do_pow(const _Tp& __x, const _Tp& __y)    { return _STLP_VENDOR_CSTD::pow(__x, __y); } 
  static inline _Tp _do_pow(const _Tp& __x, int __y)    { return _STLP_VENDOR_CSTD::pow(__x, __y); } 
  static inline _Tp _do_sin(const _Tp& __x)     { return _STLP_VENDOR_CSTD::sin(__x); } 
  static inline _Tp _do_sinh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::sinh(__x); } 

  static inline _Tp _do_sqrt(const _Tp& __x)    { return _STLP_VENDOR_CSTD::sqrt(__x); } 
  static inline _Tp _do_tan(const _Tp& __x)     { return _STLP_VENDOR_CSTD::tan(__x); } 
  static inline _Tp _do_tanh(const _Tp& __x)    { return _STLP_VENDOR_CSTD::tanh(__x); } 
  static inline _Tp _do_exp(const _Tp& __x)     { return _STLP_VENDOR_CSTD::exp(__x); } 
  static inline _Tp _do_hypot(const _Tp& __x, const _Tp& __y)   { return _STLP_VENDOR_CSTD::hypot(__x, __y); } 
};

#  define _STLP_DO_ABS(_Tp)   _STL_math_proxy<_Tp>::_do_abs
#  define _STLP_DO_ACOS(_Tp)  _STL_math_proxy<_Tp>::_do_acos
#  define _STLP_DO_ASIN(_Tp)  _STL_math_proxy<_Tp>::_do_asin
#  define _STLP_DO_ATAN(_Tp)  _STL_math_proxy<_Tp>::_do_atan
#  define _STLP_DO_ATAN2(_Tp) _STL_math_proxy<_Tp>::_do_atan2
#  define _STLP_DO_COS(_Tp)   _STL_math_proxy<_Tp>::_do_cos
#  define _STLP_DO_COSH(_Tp)  _STL_math_proxy<_Tp>::_do_cosh
#  define _STLP_DO_FLOOR(_Tp) _STL_math_proxy<_Tp>::_do_floor
#  define _STLP_DO_CEIL(_Tp) _STL_math_proxy<_Tp>::_do_ceil
#  define _STLP_DO_FMOD(_Tp) _STL_math_proxy<_Tp>::_do_fmod
#  define _STLP_DO_FREXP(_Tp) _STL_math_proxy<_Tp>::_do_frexp
#  define _STLP_DO_LDEXP(_Tp) _STL_math_proxy<_Tp>::_do_ldexp
#  define _STLP_DO_MODF(_Tp) _STL_math_proxy<_Tp>::_do_modf
#  define _STLP_DO_LOG(_Tp)   _STL_math_proxy<_Tp>::_do_log
#  define _STLP_DO_LOG10(_Tp) _STL_math_proxy<_Tp>::_do_log10
#  define _STLP_DO_POW(_Tp)   _STL_math_proxy<_Tp>::_do_pow
#  define _STLP_DO_SIN(_Tp)   _STL_math_proxy<_Tp>::_do_sin
#  define _STLP_DO_SINH(_Tp)  _STL_math_proxy<_Tp>::_do_sinh
#  define _STLP_DO_SQRT(_Tp)  _STL_math_proxy<_Tp>::_do_sqrt
#  define _STLP_DO_TAN(_Tp)   _STL_math_proxy<_Tp>::_do_tan
#  define _STLP_DO_TANH(_Tp)  _STL_math_proxy<_Tp>::_do_tanh
#  define _STLP_DO_EXP(_Tp)   _STL_math_proxy<_Tp>::_do_exp
#  define _STLP_DO_HYPOT(_Tp) _STL_math_proxy<_Tp>::_do_hypot
# else

#  define _STLP_DO_ABS(_Tp)   _STLP_VENDOR_CSTD::fabs
#  define _STLP_DO_ACOS(_Tp)  _STLP_VENDOR_CSTD::acos
#  define _STLP_DO_ASIN(_Tp)  _STLP_VENDOR_CSTD::asin
#  define _STLP_DO_ATAN(_Tp)  _STLP_VENDOR_CSTD::atan
#  define _STLP_DO_ATAN2(_Tp) _STLP_VENDOR_CSTD::atan2
#  define _STLP_DO_COS(_Tp)   _STLP_VENDOR_CSTD::cos
#  define _STLP_DO_COSH(_Tp)  _STLP_VENDOR_CSTD::cosh
#  define _STLP_DO_FLOOR(_Tp)  _STLP_VENDOR_CSTD::floor
#  define _STLP_DO_CEIL(_Tp)   _STLP_VENDOR_CSTD::ceil
#  define _STLP_DO_FMOD(_Tp)   _STLP_VENDOR_CSTD::fmod
#  define _STLP_DO_FREXP(_Tp) _STLP_VENDOR_CSTD::frexp
#  define _STLP_DO_LDEXP(_Tp) _STLP_VENDOR_CSTD::ldexp
#  define _STLP_DO_MODF(_Tp) _STLP_VENDOR_CSTD::modf
#  define _STLP_DO_LOG(_Tp)   _STLP_VENDOR_CSTD::log
#  define _STLP_DO_LOG10(_Tp) _STLP_VENDOR_CSTD::log10
#  define _STLP_DO_POW(_Tp)   _STLP_VENDOR_CSTD::pow
#  define _STLP_DO_SIN(_Tp)   _STLP_VENDOR_CSTD::sin
#  define _STLP_DO_SINH(_Tp)  _STLP_VENDOR_CSTD::sinh
#  define _STLP_DO_SQRT(_Tp)  _STLP_VENDOR_CSTD::sqrt
#  define _STLP_DO_TAN(_Tp)   _STLP_VENDOR_CSTD::tan
#  define _STLP_DO_TANH(_Tp)  _STLP_VENDOR_CSTD::tanh
#  define _STLP_DO_EXP(_Tp)   _STLP_VENDOR_CSTD::exp
//# if defined (__GNUC__) || defined ( __IBMCPP__ ) || defined (__SUNPRO_CC) || defined (__HP_aCC) || (_MSC_VER >= 1310)
#  define _STLP_DO_HYPOT(_Tp) ::hypot
// # else
// #  define _STLP_DO_HYPOT(_Tp) _STLP_VENDOR_CSTD::hypot
// # endif

# endif

_STLP_END_NAMESPACE

# if (defined (_STLP_HAS_NO_NEW_C_HEADERS) || defined(_STLP_MSVC) || defined (__ICL)) && !defined (_STLP_HAS_NO_NAMESPACES)

#if ! defined (_STLP_USE_NEW_C_HEADERS) 

_STLP_BEGIN_NAMESPACE

#  ifndef _STLP_HAS_NATIVE_FLOAT_ABS
inline double abs(double __x)                 { return _STLP_DO_ABS(double)(__x); }
inline float abs (float __x)                  { return _STLP_DO_ABS(float)(__x); }
#  endif

inline double pow(double __x, int __y)        { return _STLP_DO_POW(double)(__x, __y); }
inline float acos (float __x)                 { return _STLP_DO_ACOS(float)(__x); }
inline float asin (float __x)                 { return _STLP_DO_ASIN(float)(__x); }
inline float atan (float __x)                 { return _STLP_DO_ATAN(float)(__x); }
inline float atan2(float __x, float __y)      { return _STLP_DO_ATAN2(float)(__x, __y); }
inline float ceil (float __x)                 { return _STLP_DO_CEIL(float)(__x); }
inline float cos (float __x)                  { return _STLP_DO_COS(float)(__x); }
inline float cosh (float __x)                 { return _STLP_DO_COSH(float)(__x); }
inline float exp (float __x)                  { return _STLP_DO_EXP(float)(__x); }
# ifdef _STLP_USE_NAMESPACES
inline float fabs (float __x)                 { return _STLP_DO_ABS(float)(__x); }
# endif
inline float floor(float __x)                 { return _STLP_DO_FLOOR(float)(__x); }
inline float fmod (float __x, float __y)      { return _STLP_DO_FMOD(float)(__x, __y); }
inline float frexp(float __x, int* __y)       { return _STLP_DO_FREXP(float)(__x, __y); }
inline float ldexp(float __x, int __y)        { return _STLP_DO_LDEXP(float)(__x, __y); }
// fbp : float versions are not always available
#if !defined(_STLP_VENDOR_LONG_DOUBLE_MATH)        //*ty 11/25/2001 - 
inline float modf (float __x, float* __y)     { 
  double __dd[2]; 
  double __res = _STLP_DO_MODF(double)((double)__x, __dd); 
  __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; 
  return (float)__res; 
}
#else        //*ty 11/25/2001 - i.e. for apple SCpp
inline float modf (float __x, float* __y)     { 
  long double __dd[2]; 
  long double __res = _STLP_DO_MODF(long double)((long double)__x, __dd); 
  __y[0] = (float)__dd[0] ; __y[1] = (float)__dd[1]; 
  return (float)__res; 
}
#endif        //*ty 11/25/2001 - 

inline float log (float __x)                  { return _STLP_DO_LOG(float)(__x); }
inline float log10(float __x)                 { return _STLP_DO_LOG10(float)(__x); }
inline float pow (float __x, float __y)       { return _STLP_DO_POW(float)(__x, __y); }
inline float pow (float __x, int __y)         { return _STLP_DO_POW(float)(__x, __y); }
inline float sin (float __x)                  { return _STLP_DO_SIN(float)(__x); }
inline float sinh (float __x)                 { return _STLP_DO_SINH(float)(__x); }
inline float sqrt (float __x)                 { return _STLP_DO_SQRT(float)(__x); }
inline float tan (float __x)                  { return _STLP_DO_TAN(float)(__x); }
inline float tanh (float __x)                 { return _STLP_DO_TANH(float)(__x); }

#  if ! (defined  (_STLP_NO_LONG_DOUBLE) || defined(_STLP_VENDOR_LONG_DOUBLE_MATH))

#if !defined (__MVS__)
inline long double abs (long double __x)                  { return _STLP_DO_ABS(long double)((double)__x); }
#endif
inline long double acos (long double __x)                 { return _STLP_DO_ACOS(long double)(__x); }
inline long double asin (long double __x)                 { return _STLP_DO_ASIN(long double)(__x); }
inline long double atan (long double __x)                 { return _STLP_DO_ATAN(long double)(__x); }
inline long double atan2(long double __x, long double __y)      { return _STLP_DO_ATAN2(long double)(__x, __y); }
inline long double ceil (long double __x)                 { return _STLP_DO_CEIL(long double)(__x); }
inline long double cos (long double __x)                  { return _STLP_DO_COS(long double)(__x); }
inline long double cosh (long double __x)                 { return _STLP_DO_COSH(long double)(__x); }
inline long double exp (long double __x)                  { return _STLP_DO_EXP(long double)(__x); }
inline long double fabs (long double __x)                 { return _STLP_DO_ABS(long double)(__x); }
inline long double floor(long double __x)                 { return _STLP_DO_FLOOR(long double)(__x); }
inline long double fmod (long double __x, long double __y)      { return _STLP_DO_FMOD(long double)(__x, __y); }
inline long double frexp(long double __x, int* __y)       { return _STLP_DO_FREXP(long double)(__x, __y); }
inline long double ldexp(long double __x, int __y)        { return _STLP_DO_LDEXP(long double)(__x, __y); }
// fbp : long double versions are not available
inline long double modf (long double __x, long double* __y)     { 
  double __dd[2]; 
  double __res = _STLP_DO_MODF(double)((double)__x, __dd); 
  __y[0] = (long double)__dd[0] ; __y[1] = (long double)__dd[1]; 
  return (long double)__res; 
}
inline long double log (long double __x)                  { return _STLP_DO_LOG(long double)(__x); }
inline long double log10(long double __x)                 { return _STLP_DO_LOG10(long double)(__x); }
inline long double pow (long double __x, long double __y)       { return _STLP_DO_POW(long double)(__x, __y); }
inline long double pow (long double __x, int __y)         { return _STLP_DO_POW(long double)(__x, __y); }
inline long double sin (long double __x)                  { return _STLP_DO_SIN(long double)(__x); }
inline long double sinh (long double __x)                 { return _STLP_DO_SINH(long double)(__x); }
inline long double sqrt (long double __x)                 { return _STLP_DO_SQRT(long double)(__x); }
inline long double tan (long double __x)                  { return _STLP_DO_TAN(long double)(__x); }
inline long double tanh (long double __x)                 { return _STLP_DO_TANH(long double)(__x); }
#  endif

_STLP_END_NAMESPACE

# endif /* NEW_C_HEADERS */
# endif /* NEW_C_HEADERS */

#endif /* CMATH_H */

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Authors

Apriorit Inc
Apriorit Inc.
Ukraine Ukraine
ApriorIT is a Software Research and Development company that works in advanced knowledge-intensive scopes.
 
Company offers integrated research&development services for the software projects in such directions as Corporate Security, Remote Control, Mobile Development, Embedded Systems, Virtualization, Drivers and others.
 
Official site http://www.apriorit.com
Group type: Organisation

31 members

Follow on   LinkedIn

Ivan Romanenko
Software Developer Codedgers Inc
Ukraine Ukraine
No Biography provided

| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.1411028.1 | Last Updated 10 Mar 2010
Article Copyright 2010 by Apriorit Inc, Ivan Romanenko
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid