ReactOS Fundraising Campaign 2012
 
€ 4,410 / € 30,000

Information | Donate

Home | Info | Community | Development | myReactOS | Contact Us

  1. Home
  2. Community
  3. Development
  4. myReactOS
  5. Fundraiser 2012

  1. Main Page
  2. Alphabetical List
  3. Data Structures
  4. Directories
  5. File List
  6. Data Fields
  7. Globals
  8. Related Pages

ReactOS Development > Doxygen

basetsd.h
Go to the documentation of this file.
00001 #ifndef _BASETSD_H
00002 #define _BASETSD_H
00003 
00004 #ifndef _M_AMD64
00005 #if !defined(__ROS_LONG64__)
00006 #ifdef __WINESRC__
00007 #define __ROS_LONG64__
00008 #endif
00009 #endif
00010 #endif
00011 
00012 #ifdef __GNUC__
00013 #ifndef __int64
00014 #define __int64 long long
00015 #endif
00016 #endif
00017 
00018 #if defined(_MSC_VER) && (_MSC_VER < 1300)
00019 #error Old MSVC compiler version.
00020 #endif
00021 
00022 #ifdef _MAC
00023 #error Not supported.
00024 #endif
00025 
00026 #if !defined(_X86_) && !defined(_AMD64_) && !defined(_IA64_) && !defined(_ALPHA_) && \
00027     !defined(_ARM_) && !defined(_PPC_) && !defined(_MIPS_) && !defined(_68K_)
00028 
00029 #if defined(_M_AMD64) || defined(__x86_64__)
00030 #define _AMD64_
00031 #elif defined(_M_IX86) || defined(__i386__)
00032 #define _X86_
00033 #elif defined(_M_IA64) || defined(__ia64__)
00034 #define _IA64_
00035 #elif defined(_M_ALPHA) || defined(__alpha__)
00036 #define _ALPHA_
00037 #elif defined(_M_ARM) || defined(__arm__)
00038 #define _ARM_
00039 #elif defined(_M_PPC) || defined(__powerpc__)
00040 #define _PPC_
00041 #elif defined(_M_MRX000) || defined(__mips__)
00042 #define _MIPS_
00043 #elif defined(_M_M68K) || defined(__68k__)
00044 #define _68K_
00045 #endif
00046 
00047 #endif
00048 
00049 #if !defined(MIDL_PASS) && !defined(RC_INVOKED)
00050  #define POINTER_64 __ptr64
00051  #if defined(_WIN64)
00052   #define POINTER_32 __ptr32
00053  #else
00054   #define POINTER_32
00055  #endif
00056 #else
00057  #define POINTER_64
00058  #define POINTER_32
00059 #endif /* !defined(MIDL_PASS) && !defined(RC_INVOKED) */
00060 
00061 #if defined(_M_MRX000) || defined(_M_AMD64) || defined(_M_IA64)
00062  typedef unsigned __int64 POINTER_64_INT;
00063 #else
00064  typedef unsigned long POINTER_64_INT;
00065 #endif
00066 
00067 #if 0 /* Not supported yet */
00068 #define POINTER_SIGNED __sptr
00069 #define POINTER_UNSIGNED __uptr
00070 #else
00071 #define POINTER_SIGNED
00072 #define POINTER_UNSIGNED
00073 #endif
00074 
00075 #define SPOINTER_32 POINTER_SIGNED POINTER_32
00076 #define UPOINTER_32 POINTER_UNSIGNED POINTER_32
00077 
00078 #if defined(_WIN64)
00079 #define __int3264   __int64
00080 typedef __int64 SHANDLE_PTR;
00081 typedef unsigned __int64 HANDLE_PTR;
00082 typedef unsigned int UHALF_PTR, *PUHALF_PTR;
00083 typedef int HALF_PTR, *PHALF_PTR;
00084 #define ADDRESS_TAG_BIT 0x40000000000UI64
00085 #else /*  !_WIN64 */
00086 #define __int3264   __int32
00087 #define ADDRESS_TAG_BIT 0x80000000UL
00088 typedef unsigned short UHALF_PTR, *PUHALF_PTR;
00089 typedef short HALF_PTR, *PHALF_PTR;
00090 typedef long SHANDLE_PTR;
00091 typedef unsigned long HANDLE_PTR;
00092 #define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
00093 #define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
00094 #define ULongToHandle( h) ((HANDLE)(ULONG_PTR) (h))
00095 #define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
00096 #define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
00097 #define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
00098 #define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
00099 #define PtrToInt( p ) ((INT)(INT_PTR) (p) )
00100 #define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
00101 #define PtrToShort( p ) ((short)(LONG_PTR)(p) )
00102 #define IntToPtr( i )    ((VOID*)(INT_PTR)((int)i))
00103 #define UIntToPtr( ui )  ((VOID*)(UINT_PTR)((unsigned int)ui))
00104 #define LongToPtr( l )   ((VOID*)(LONG_PTR)((long)l))
00105 #define ULongToPtr( ul )  ((VOID*)(ULONG_PTR)((unsigned long)ul))
00106 #endif /* !_WIN64 */
00107 
00108 #define HandleToULong(h) HandleToUlong(h)
00109 
00110 #define UlongToHandle(ul) ULongToHandle(ul)
00111 #define UlongToPtr(ul) ULongToPtr(ul)
00112 #define UintToPtr(ui) UIntToPtr(ui)
00113 #define MAXUINT_PTR  (~((UINT_PTR)0))
00114 #define MAXINT_PTR   ((INT_PTR)(MAXUINT_PTR >> 1))
00115 #define MININT_PTR   (~MAXINT_PTR)
00116 #define MAXULONG_PTR (~((ULONG_PTR)0))
00117 #define MAXLONG_PTR  ((LONG_PTR)(MAXULONG_PTR >> 1))
00118 #define MINLONG_PTR  (~MAXLONG_PTR)
00119 #define MAXUHALF_PTR ((UHALF_PTR)~0)
00120 #define MAXHALF_PTR  ((HALF_PTR)(MAXUHALF_PTR >> 1))
00121 #define MINHALF_PTR  (~MAXHALF_PTR)
00122 
00123 #if _WIN32_WINNT >= 0x0600
00124 
00125 #define MAXUINT      ((UINT)~((UINT)0))
00126 #define MAXULONGLONG ((ULONGLONG)~((ULONGLONG)0))
00127 
00128 #endif
00129 
00130 #ifndef RC_INVOKED
00131 #ifdef __cplusplus
00132 extern "C" {
00133 #endif
00134 typedef int LONG32, *PLONG32;
00135 #ifndef XFree86Server
00136 typedef int INT32, *PINT32;
00137 #endif /* ndef XFree86Server */
00138 typedef unsigned int ULONG32, *PULONG32;
00139 typedef unsigned int DWORD32, *PDWORD32;
00140 typedef unsigned int UINT32, *PUINT32;
00141 
00142 #if defined(_WIN64)
00143 typedef __int64 INT_PTR, *PINT_PTR;
00144 typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
00145 typedef __int64 LONG_PTR, *PLONG_PTR;
00146 typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
00147 
00148 #if !defined(__midl) && !defined(__WIDL__)
00149 static inline unsigned long HandleToUlong(const void* h )
00150     { return((unsigned long)(ULONG_PTR) h ); }
00151 static inline long HandleToLong( const void* h )
00152     { return((long)(LONG_PTR) h ); }
00153 static inline void* ULongToHandle( const long h )
00154     { return((void*) (UINT_PTR) h ); }
00155 static inline void* LongToHandle( const long h )
00156     { return((void*) (INT_PTR) h ); }
00157 static inline unsigned long PtrToUlong( const void* p)
00158     { return((unsigned long)(ULONG_PTR) p ); }
00159 static inline unsigned int PtrToUint( const void* p )
00160     { return((unsigned int)(UINT_PTR) p ); }
00161 static inline unsigned short PtrToUshort( const void* p )
00162     { return((unsigned short)(ULONG_PTR) p ); }
00163 static inline long PtrToLong( const void* p )
00164     { return((long)(LONG_PTR) p ); }
00165 static inline int PtrToInt( const void* p )
00166     { return((int)(INT_PTR) p ); }
00167 static inline short PtrToShort( const void* p )
00168     { return((short)(INT_PTR) p ); }
00169 static inline void* IntToPtr( const int i )
00170     { return( (void*)(INT_PTR)i ); }
00171 static inline void* UIntToPtr(const unsigned int ui)
00172     { return( (void*)(UINT_PTR)ui ); }
00173 static inline void* LongToPtr( const long l )
00174     { return( (void*)(LONG_PTR)l ); }
00175 static inline void* ULongToPtr( const unsigned long ul )
00176     { return( (void*)(ULONG_PTR)ul ); }
00177 #endif /* !__midl */
00178 #else /*  !_WIN64 */
00179 #if !defined(__ROS_LONG64__)
00180 typedef int INT_PTR, *PINT_PTR;
00181 typedef unsigned int UINT_PTR, *PUINT_PTR;
00182 #else
00183 typedef long INT_PTR, *PINT_PTR;
00184 typedef unsigned long UINT_PTR, *PUINT_PTR;
00185 #endif
00186 
00187 #ifndef LONG_PTR_DEFINED
00188 #define LONG_PTR_DEFINED
00189     typedef long LONG_PTR, *PLONG_PTR;
00190     typedef unsigned long ULONG_PTR, *PULONG_PTR;
00191 #endif
00192 
00193 #endif /* !_WIN64 */
00194 
00195 typedef ULONG_PTR SIZE_T, *PSIZE_T;
00196 typedef LONG_PTR SSIZE_T, *PSSIZE_T;
00197 typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
00198 typedef __int64 LONG64, *PLONG64;
00199 typedef __int64 INT64,  *PINT64;
00200 typedef unsigned __int64 ULONG64, *PULONG64;
00201 typedef unsigned __int64 DWORD64, *PDWORD64;
00202 typedef unsigned __int64 UINT64,  *PUINT64;
00203 
00204 typedef signed char INT8, *PINT8;
00205 typedef unsigned char UINT8, *PUINT8;
00206 typedef signed short INT16, *PINT16;
00207 typedef unsigned short UINT16, *PUINT16;
00208 
00209 typedef ULONG_PTR KAFFINITY;
00210 typedef KAFFINITY *PKAFFINITY;
00211 
00212 #ifdef __cplusplus
00213 }
00214 #endif
00215 #endif /* !RC_INVOKED */
00216 
00217 #endif /* _BASETSD_H */

Generated on Sun May 27 2012 04:31:08 for ReactOS by doxygen 1.7.6.1

ReactOS is a registered trademark or a trademark of ReactOS Foundation in the United States and other countries.