Click here to Skip to main content
15,886,137 members
Articles / Desktop Programming / MFC

Driver to Hide Processes and Files

, ,
Rate me:
Please Sign up or sign in to vote.
4.57/5 (145 votes)
17 Aug 2009CPOL12 min read 655K   28.6K   369  
In this article, we describe the driver we created to hide processes and files in a system.
#ifndef _STLP_PTRS_SPECIALIZE_H
# define _STLP_PTRS_SPECIALIZE_H

// the following is a workaround for arrow operator problems
#  if defined  ( _STLP_NO_ARROW_OPERATOR ) 
// User wants to disable proxy -> operators
#    define _STLP_DEFINE_ARROW_OPERATOR
#    define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)
# else
// Compiler can handle generic -> operator.
#  define _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Tp)
#  ifdef __BORLANDC__
#   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(*(*this)); }
#  elif defined ( _STLP_WINCE ) || defined(__WATCOMC__)
#   define _STLP_DEFINE_ARROW_OPERATOR pointer operator->() const { reference x = operator*(); return &x; }
#  else
#   define _STLP_DEFINE_ARROW_OPERATOR  pointer operator->() const { return &(operator*()); }
#  endif
# endif /* _STLP_NO_ARROW_OPERATOR */

// Important pointers specializations

# ifdef _STLP_SIMULATE_PARTIAL_SPEC_FOR_TYPE_TRAITS
#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type)
#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type)
# else
#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type) _STLP_TEMPLATE_NULL struct __type_traits<_Type> : __type_traits_aux<true> {};
#  define _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) \
_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type*) \
_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type*) \
_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type**) \
_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type* const *) \
_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type**) \
_STLP_TYPE_TRAITS_POD_SPECIALIZE(_Type***) \
_STLP_TYPE_TRAITS_POD_SPECIALIZE(const _Type***)
# endif

# define _STLP_POINTERS_SPECIALIZE(_Type) _STLP_TYPE_TRAITS_POD_SPECIALIZE_V(_Type) _STLP_ARROW_SPECIALIZE_WITH_PTRS(_Type)

#  if !defined ( _STLP_NO_BOOL )
_STLP_POINTERS_SPECIALIZE( bool )
#  endif
_STLP_TYPE_TRAITS_POD_SPECIALIZE_V(void)
# ifndef _STLP_NO_SIGNED_BUILTINS
  _STLP_POINTERS_SPECIALIZE( signed char )
# endif
  _STLP_POINTERS_SPECIALIZE( char )
  _STLP_POINTERS_SPECIALIZE( unsigned char )
  _STLP_POINTERS_SPECIALIZE( short )
  _STLP_POINTERS_SPECIALIZE( unsigned short )
  _STLP_POINTERS_SPECIALIZE( int )
  _STLP_POINTERS_SPECIALIZE( unsigned int )
  _STLP_POINTERS_SPECIALIZE( long )
  _STLP_POINTERS_SPECIALIZE( unsigned long )
  _STLP_POINTERS_SPECIALIZE( float )
  _STLP_POINTERS_SPECIALIZE( double )
#  if !defined ( _STLP_NO_LONG_DOUBLE )
  _STLP_POINTERS_SPECIALIZE( long double )
#  endif
#  if defined ( _STLP_LONG_LONG)
  _STLP_POINTERS_SPECIALIZE( _STLP_LONG_LONG )
  _STLP_POINTERS_SPECIALIZE( unsigned _STLP_LONG_LONG )
#  endif
#if defined ( _STLP_HAS_WCHAR_T ) && ! defined (_STLP_WCHAR_T_IS_USHORT)
  _STLP_POINTERS_SPECIALIZE( wchar_t )
#  endif

# undef _STLP_ARROW_SPECIALIZE
# undef _STLP_ARROW_SPECIALIZE_WITH_PTRS
# undef _STLP_TYPE_TRAITS_POD_SPECIALIZE_V

#endif

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)


Written By
Chief Technology Officer Apriorit Inc.
United States United States
ApriorIT is a software research and development company specializing in cybersecurity and data management technology engineering. We work for a broad range of clients from Fortune 500 technology leaders to small innovative startups building unique solutions.

As Apriorit offers integrated research&development services for the software projects in such areas as endpoint security, network security, data security, embedded Systems, and virtualization, we have strong kernel and driver development skills, huge system programming expertise, and are reals fans of research projects.

Our specialty is reverse engineering, we apply it for security testing and security-related projects.

A separate department of Apriorit works on large-scale business SaaS solutions, handling tasks from business analysis, data architecture design, and web development to performance optimization and DevOps.

Official site: https://www.apriorit.com
Clutch profile: https://clutch.co/profile/apriorit
This is a Organisation

33 members

Written By
Software Developer Codedgers Inc
Ukraine Ukraine
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Written By
Software Developer (Junior) ApriorIT
Ukraine Ukraine
Sergey Popenko.
22 years old.
The Driver Team`s software developer.
Master of the Applied Math faculty, the Dnipropetrovsk National University, Ukraine.

Comments and Discussions