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.

108 lines
5.2 KiB

  1. #if !defined(_M_I86)
  2. // The 32-bit compiler
  3. #define __far
  4. #define __near
  5. #define __pascal
  6. #define __loadds
  7. #endif
  8. typedef char * pchar_t;
  9. typedef const char * pcchar_t;
  10. typedef void * ( __cdecl * Alloc_t )( size_t );
  11. typedef void ( __cdecl * Free_t )( void * );
  12. typedef char * ( __cdecl * GetParameter_t )( long );
  13. #ifdef __cplusplus
  14. extern "C"
  15. #endif
  16. #ifdef _CRTBLD
  17. _CRTIMP pchar_t __cdecl __unDName (
  18. #else
  19. pchar_t __cdecl unDName (
  20. #endif
  21. pchar_t, // User supplied buffer (or NULL)
  22. pcchar_t, // Input decorated name
  23. int, // Maximum length of user buffer
  24. Alloc_t, // Address of heap allocator
  25. Free_t, // Address of heap deallocator
  26. unsigned short // Feature disable flags
  27. );
  28. #ifdef __cplusplus
  29. extern "C"
  30. #endif
  31. #ifdef _CRTBLD
  32. _CRTIMP pchar_t __cdecl __unDNameEx (
  33. #else
  34. pchar_t __cdecl unDNameEx (
  35. #endif
  36. pchar_t, // User supplied buffer (or NULL)
  37. pcchar_t, // Input decorated name
  38. int, // Maximum length of user buffer
  39. Alloc_t, // Address of heap allocator
  40. Free_t, // Address of heap deallocator
  41. GetParameter_t, // Function to get any template parameters
  42. unsigned long // Feature disable flags
  43. );
  44. /*
  45. * The user may provide a buffer into which the undecorated declaration
  46. * is to be placed, in which case, the length field must be specified.
  47. * The length is the maximum number of characters (including the terminating
  48. * NULL character) which may be written into the user buffer.
  49. *
  50. * If the output buffer is NULL, the length field is ignored, and the
  51. * undecorator will allocate a buffer exactly large enough to hold the
  52. * resulting declaration. It is the users responsibility to deallocate
  53. * this buffer.
  54. *
  55. * The user may also supply the allocator and deallocator functions if
  56. * they wish. If they do, then all heap actions performed by the routine
  57. * will use the provided heap functions.
  58. *
  59. * If the allocator address is NULL, then the routine will default to using
  60. * the standard allocator and deallocator functions, 'malloc' and 'free'.
  61. *
  62. * If an error occurs internally, then the routine will return NULL. If
  63. * it was successful, it will return the buffer address provided by the
  64. * user, or the address of the buffer allocated on their behalf, if they
  65. * specified a NULL buffer address.
  66. *
  67. * If a given name does not have a valid undecoration, the original name
  68. * is returned in the output buffer.
  69. *
  70. * Fine selection of a number of undecorator attributes is possible, by
  71. * specifying flags (bit-fields) to disable the production of parts of the
  72. * complete declaration. The flags may be OR'ed together to select multiple
  73. * disabling of selected fields. The fields and flags are as follows :-
  74. */
  75. #define UNDNAME_COMPLETE (0x0000) // Enable full undecoration
  76. #define UNDNAME_NO_LEADING_UNDERSCORES (0x0001) // Remove leading underscores from MS extended keywords
  77. #define UNDNAME_NO_MS_KEYWORDS (0x0002) // Disable expansion of MS extended keywords
  78. #define UNDNAME_NO_FUNCTION_RETURNS (0x0004) // Disable expansion of return type for primary declaration
  79. #define UNDNAME_NO_ALLOCATION_MODEL (0x0008) // Disable expansion of the declaration model
  80. #define UNDNAME_NO_ALLOCATION_LANGUAGE (0x0010) // Disable expansion of the declaration language specifier
  81. #define UNDNAME_NO_MS_THISTYPE (0x0020) /* NYI */ // Disable expansion of MS keywords on the 'this' type for primary declaration
  82. #define UNDNAME_NO_CV_THISTYPE (0x0040) /* NYI */ // Disable expansion of CV modifiers on the 'this' type for primary declaration
  83. #define UNDNAME_NO_THISTYPE (0x0060) // Disable all modifiers on the 'this' type
  84. #define UNDNAME_NO_ACCESS_SPECIFIERS (0x0080) // Disable expansion of access specifiers for members
  85. #define UNDNAME_NO_THROW_SIGNATURES (0x0100) // Disable expansion of 'throw-signatures' for functions and pointers to functions
  86. #define UNDNAME_NO_MEMBER_TYPE (0x0200) // Disable expansion of 'static' or 'virtual'ness of members
  87. #define UNDNAME_NO_RETURN_UDT_MODEL (0x0400) // Disable expansion of MS model for UDT returns
  88. #define UNDNAME_32_BIT_DECODE (0x0800) // Undecorate 32-bit decorated names
  89. #define UNDNAME_NAME_ONLY (0x1000) // Crack only the name for primary declaration;
  90. // return just [scope::]name. Does expand template params
  91. #define UNDNAME_TYPE_ONLY (0x2000) // Input is just a type encoding; compose an abstract declarator
  92. #define UNDNAME_HAVE_PARAMETERS (0x4000) // The real templates parameters are available
  93. #define UNDNAME_NO_ECSU (0x8000) // Suppress enum/class/struct/union
  94. #define UNDNAME_NO_IDENT_CHAR_CHECK (0x10000) // Suppress check for IsValidIdentChar
  95. #define UNDNAME_NO_PTR64 (0x20000) // disable just ptr64 in output