util.h
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 1k
Category:

Windows Kernel

Development Platform:

Visual C++

  1. /*****************************************************************************
  2.  *
  3.  * util.h - Shared stuff that operates on all classes
  4.  *
  5.  *****************************************************************************/
  6. #ifndef _UTIL_H
  7. #define _UTIL_H
  8. #include "dllload.h"
  9. extern HINSTANCE g_hinst;
  10. #define HINST_THISDLL g_hinst
  11. #ifdef  UNICODE
  12.    typedef WCHAR TUCHAR, *PTUCHAR;
  13. #else   /* UNICODE */
  14.    typedef unsigned char TUCHAR, *PTUCHAR;
  15. #endif /* UNICODE */
  16. #ifdef UNICODE
  17. #define AllocBStrFromString(psz)    SysAllocString(psz)
  18. #define TCharSysAllocString(psz)    SysAllocString(psz)
  19. #else
  20. extern BSTR AllocBStrFromString(LPTSTR);
  21. #define TCharSysAllocString(psz)    AllocBStrFromString(psz)
  22. #endif
  23. #endif // _UTIL_H