1 /****************************************************************************
3 * $Id: pnbastsd.h 7 2003-05-30 02:18:02Z gabest $
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
7 * http://www.real.com/devzone
9 * This file is a replacement for the basetsd.h file from VC++ 6.0.
10 * This will automatically be included by pntypes.h when using VC++
11 * 6.0 or greater. This file correctly defines the basic sized types
12 * so they don't conflict with the G2 SDK.
16 #if !(defined(_MSC_VER) && (_MSC_VER > 1100))
17 #error pnbastsd.h is only intended for use with Microsoft VC++ 6.0 or higher
28 * The following types were defined in pntypes.h and so are intentionally
29 * not included in this file. They are left here for documentation purposes.
34 typedef unsigned int ULONG32
;
35 typedef unsigned int UINT32
;
39 * The following types are 32 bits wide and unsigned.
41 typedef unsigned int *PULONG32
;
42 typedef unsigned int DWORD32
, *PDWORD32
;
43 typedef unsigned int *PUINT32
;
46 * INT_PTR is the same size as a pointer. Its size changes with pointer
47 * size (32 bit or 64 bit). HALF_PTR is half the size of a pointer.
51 typedef __int64 INT_PTR
, *PINT_PTR
;
52 typedef unsigned __int64 UINT_PTR
, *PUINT_PTR
;
54 #define MAXINT_PTR (0x7fffffffffffffffI64)
55 #define MININT_PTR (0x8000000000000000I64)
56 #define MAXUINT_PTR (0xffffffffffffffffUI64)
58 typedef unsigned int UHALF_PTR
, *PUHALF_PTR
;
59 typedef int HALF_PTR
, *PHALF_PTR
;
61 #define MAXUHALF_PTR (0xffffffffUL)
62 #define MAXHALF_PTR (0x7fffffffL)
63 #define MINHALF_PTR (0x80000000L)
65 #pragma warning(disable:4311) /* type cast truncation */
74 return((unsigned long) h
);
83 return((unsigned long) p
);
92 return((unsigned short) p
);
113 #pragma warning(3:4311) /* type cast truncation */
118 typedef long INT_PTR
, *PINT_PTR
;
119 typedef unsigned long UINT_PTR
, *PUINT_PTR
;
121 #define MAXINT_PTR (0x7fffffffL)
122 #define MININT_PTR (0x80000000L)
123 #define MAXUINT_PTR (0xffffffffUL)
125 typedef unsigned short UHALF_PTR
, *PUHALF_PTR
;
126 typedef short HALF_PTR
, *PHALF_PTR
;
128 #define MAXUHALF_PTR 0xffff
129 #define MAXHALF_PTR 0x7fff
130 #define MINHALF_PTR 0x8000
132 #define HandleToUlong( h ) ((ULONG) (h) )
133 #define PtrToUlong( p ) ((ULONG) (p) )
134 #define PtrToLong( p ) ((LONG) (p) )
135 #define PtrToUshort( p ) ((unsigned short) (p) )
136 #define PtrToShort( p ) ((short) (p) )
141 * Basic SIZE_T support.
143 typedef UINT_PTR SIZE_T
, *PSIZE_T
;
144 typedef INT_PTR SSIZE_T
, *PSSIZE_T
;
147 * These types are 64 bits wide and signed.
149 typedef __int64 LONG64
, *PLONG64
;
150 typedef __int64 INT64
, *PINT64
;
153 * These types are 64 bits wide and unsigned.
155 typedef unsigned __int64 ULONG64
, *PULONG64
;
156 typedef unsigned __int64 DWORD64
, *PDWORD64
;
157 typedef unsigned __int64 UINT64
, *PUINT64
;
163 #endif /* _BASETSD_H_ */