Leaked source code of windows server 2003
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.

105 lines
5.2 KiB

  1. #if ( defined ( _M_IX86 ) || defined ( M_I386) || defined ( _WIN32) )
  2. // The 32-bit compiler
  3. #define __far
  4. #define __near
  5. // DLH #define __cdecl
  6. // DLH #define __pascal
  7. #define __export _export
  8. #define __loadds
  9. #elif ( defined ( _MSC_VER ) && ( _MSC_VER < 700 ))
  10. // Using C6.00 or earlier ?
  11. #define __far _far
  12. #define __near _near
  13. #define __cdecl _cdecl
  14. #define __pascal _pascal
  15. #define __export _export
  16. #define __loadds _loadds
  17. #endif
  18. #ifndef USE_CRT_HEAP
  19. #define USE_CRT_HEAP 0
  20. #endif
  21. #ifndef NO_OPTIONS
  22. #define NO_OPTIONS 0
  23. #endif
  24. typedef char __far * pchar_t;
  25. typedef const char __far * pcchar_t;
  26. #if ( !USE_CRT_HEAP )
  27. typedef void __far * ( __far __cdecl * Alloc_t )( size_t );
  28. typedef void ( __far __cdecl * Free_t )( void __far * );
  29. #endif // !USE_CRT_HEAP
  30. #if __cplusplus
  31. extern "C"
  32. #endif
  33. pchar_t __far __cdecl __loadds __unDName (
  34. pchar_t, // User supplied buffer (or NULL)
  35. pcchar_t, // Input decorated name
  36. int // Maximum length of user buffer
  37. #if ( !USE_CRT_HEAP )
  38. ,Alloc_t // Address of heap allocator
  39. ,Free_t // Address of heap deallocator
  40. #endif // USE_CRT_HEAP
  41. #if ( !NO_OPTIONS )
  42. ,unsigned short // Feature disable flags
  43. #endif // !NO_OPTIONS
  44. );
  45. /*
  46. * The user may provide a buffer into which the undecorated declaration
  47. * is to be placed, in which case, the lenght field must be specified.
  48. * The lenght is the maximum number of characters (including the terminating
  49. * NULL character) which may be written into the user buffer.
  50. *
  51. * If the output buffer is NULL, the lenght field is ignored, and the
  52. * undecorator will allocate a buffer exactly large enough to hold the
  53. * resulting declaration. It is the users responsibility to deallocate
  54. * this buffer.
  55. *
  56. * The user may also supply the allocator and deallocator functions if
  57. * they wish. If they do, then all heap actions performed by the routine
  58. * will use the provide heap functions.
  59. *
  60. * If the allocator address is NULL, then the routine will default to using
  61. * the standard allocator and deallocator functions, 'malloc' and 'free'.
  62. *
  63. * If an error occurs internally, then the routine will return NULL. If
  64. * it was successful, it will return the buffer address provided by the
  65. * user, or the address of the buffer allocated on their behalf, if they
  66. * specified a NULL buffer address.
  67. *
  68. * If a given name does not have a valid undecoration, the original name
  69. * is returned in the output buffer.
  70. *
  71. * Fine selection of a number of undecorator attributes is possible, by
  72. * specifying flags (bit-fields) to disable the production of parts of the
  73. * complete declaration. The flags may be OR'ed together to select multiple
  74. * disabling of selected fields. The fields and flags are as follows :-
  75. */
  76. #if ( !NO_OPTIONS )
  77. #define UNDNAME_COMPLETE (0x0000) // Enable full undecoration
  78. #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) // Remove leading underscores from MS extended keywords
  79. #define UNDNAME_NO_MS_KEYWORDS (0x0002) // Disable expansion of MS extended keywords
  80. #define UNDNAME_NO_FUNCTION_RETURNS (0x0004) // Disable expansion of return type for primary declaration
  81. #define UNDNAME_NO_ALLOCATION_MODEL (0x0008) // Disable expansion of the declaration model
  82. #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) // Disable expansion of the declaration language specifier
  83. #define UNDNAME_NO_MS_THISTYPE (0x0020) /* NYI */ // Disable expansion of MS keywords on the 'this' type for primary declaration
  84. #define UNDNAME_NO_CV_THISTYPE (0x0040) /* NYI */ // Disable expansion of CV modifiers on the 'this' type for primary declaration
  85. #define UNDNAME_NO_THISTYPE (0x0060) // Disable all modifiers on the 'this' type
  86. #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) // Disable expansion of access specifiers for members
  87. #define UNDNAME_NO_THROW_SIGNATURES (0x0100) // Disable expansion of 'throw-signatures' for functions and pointers to functions
  88. #define UNDNAME_NO_MEMBER_TYPE (0x0200) // Disable expansion of 'static' or 'virtual'ness of members
  89. #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) // Disable expansion of MS model for UDT returns
  90. #endif // NO_OPTIONS