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.

79 lines
2.1 KiB

  1. /***
  2. *rtti.h - prototypes of CRT entry points for run-time type information routines.
  3. *
  4. * Copyright (c) 1994-2001, Microsoft Corporation. All rights reserved.
  5. *
  6. *Purpose:
  7. * RTTI header.
  8. *
  9. * [Internal]
  10. *
  11. *Revision History:
  12. * 09-26-94 JWM Module created (prototypes only).
  13. * 10-03-94 JWM Made all prototypes 'extern "C"'
  14. * 02-14-95 CFW Clean up Mac merge.
  15. * 03-29-95 CFW Add error message to internal headers.
  16. * 12-14-95 JWM Add "#pragma once".
  17. * 02-24-97 GJF Detab-ed.
  18. * 04-21-00 PML Add throw(...) exception specifications.
  19. *
  20. ****/
  21. #if _MSC_VER > 1000 /*IFSTRIP=IGN*/
  22. #pragma once
  23. #endif
  24. #ifndef _INC_RTTI
  25. #define _INC_RTTI
  26. #ifndef _CRTBLD
  27. /*
  28. * This is an internal C runtime header file. It is used when building
  29. * the C runtimes only. It is not to be used as a public header file.
  30. */
  31. #error ERROR: Use of C runtime library internal header file.
  32. #endif /* _CRTBLD */
  33. #define _RTTI 1 // needed by ehdata.h
  34. #include <ehdata.h>
  35. #include <rttidata.h>
  36. typedef TypeDescriptor _RTTITypeDescriptor;
  37. #pragma warning(disable: 4290)
  38. #ifdef _ACTUAL_PARAMS
  39. extern "C" PVOID __cdecl __RTDynamicCast (
  40. PVOID *, // ptr to src object
  41. LONG, // offset of vfptr in src object
  42. _RTTITypeDescriptor *, // src type
  43. _RTTITypeDescriptor *, // target type
  44. BOOL) throw(...); // isReference
  45. extern "C" _RTTITypeDescriptor * __cdecl __RTtypeid (PVOID *) throw(...); // ptr to src object
  46. extern "C" PVOID __cdecl __RTCastToVoid (PVOID *) throw(...); // ptr to src object
  47. #else
  48. extern "C" PVOID __cdecl __RTDynamicCast (
  49. PVOID, // ptr to vfptr
  50. LONG, // offset of vftable
  51. PVOID, // src type
  52. PVOID, // target type
  53. BOOL) throw(...); // isReference
  54. extern "C" PVOID __cdecl __RTtypeid (PVOID) throw(...); // ptr to vfptr
  55. extern "C" PVOID __cdecl __RTCastToVoid (PVOID) throw(...); // ptr to vfptr
  56. #endif
  57. #define TYPEIDS_EQ(pID1, pID2) ((pID1 == pID2) || !strcmp(pID1->name, pID2->name))
  58. #endif /* _INC_RTTI */