Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

88 lines
2.3 KiB

  1. //+---------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1993.
  5. //
  6. // File: tostring.hxx
  7. //
  8. // Contents: Prototypes for tools that convert data structures to strings.
  9. //
  10. // Classes:
  11. //
  12. // Functions:
  13. //
  14. // History: 19-May-94 wader Created
  15. //
  16. //----------------------------------------------------------------------------
  17. #ifndef __TOSTRING_HXX__
  18. #define __TOSTRING_HXX__
  19. #ifndef WIN32_CHICAGO
  20. #include <security.h>
  21. #endif // WIN32_CHICAGO
  22. #ifndef WIN32_CHICAGO
  23. SECURITY_STRING
  24. TimeStampToString( TimeStamp ts );
  25. #else // WIN32_CHICAGO
  26. UNICODE_STRING
  27. TimeStampToString( TimeStamp ts );
  28. #endif // WIN32_CHICAGO
  29. #if 1
  30. #ifndef WIN32_CHICAGO
  31. inline SECURITY_STRING
  32. #else // WIN32_CHICAGO
  33. inline UNICODE_STRING
  34. #endif // WIN32_CHICAGO
  35. FileTimeToString( FILETIME ft )
  36. {
  37. return(TimeStampToString( *(TimeStamp*)& (ft) ));
  38. }
  39. #else
  40. #define FileTimeToString(ft) TimeStampToString( *(TimeStamp*)& (ft) )
  41. #endif
  42. #define MEMTOSTR_BYTE 0x0001
  43. #define MEMTOSTR_WORD 0x0002
  44. #define MEMTOSTR_DWORD 0x0004
  45. #define MEMTOSTR_QWORD 0x0008
  46. #define MEMTOSTR_INC_ADDR 0x0010
  47. #define MEMTOSTR_INC_SIZE 0x0020
  48. #ifndef WIN32_CHICAGO
  49. SECURITY_STRING
  50. MemoryToString( const void * const pvSrc, ULONG cCount, DWORD fFlags );
  51. #else // WIN32_CHICAGO
  52. UNICODE_STRING
  53. MemoryToString( const void * const pvSrc, ULONG cCount, DWORD fFlags );
  54. #endif // WIN32_CHICAGO
  55. #define BytesToString( pb, cb ) MemoryToString( (pb), (cb), MEMTOSTR_BYTE )
  56. #define WordsToString( pw, cw ) MemoryToString( (pw), (cw), MEMTOSTR_WORD )
  57. #define DWordsToString( pdw, cdw ) MemoryToString( (pdw), (cdw), MEMTOSTR_DWORD )
  58. #define BytesToStringVerbose( pb, cb ) \
  59. MemoryToString( (pb), (cb), MEMTOSTR_BYTE | \
  60. MEMTOSTR_INC_ADDR | MEMTOSTR_INC_SIZE )
  61. SECURITY_STRING
  62. KerbTicketRequestToString( /* PKerbTicketRequest pktrRequest */ const void * const );
  63. SECURITY_STRING
  64. KerbInternalTicketToString( /* PKerbInternalTicket pkitTicket */ const void * const );
  65. SECURITY_STRING
  66. KerbInternalAuthenticatorToString( /* PKerbInteranalAuthenticator pkaiAuth */ const void * const );
  67. SECURITY_STRING
  68. NewPACToString( /* PPACTYPE */ const void * const pvArg );
  69. #endif