Add pgs color type setting
[xy_vsfilter.git] / include / realmedia / pnbastsd.h
blobb4f02c23d206381d3f4e544115209b8fe1b548e4
1 /****************************************************************************
2 *
3 * $Id: pnbastsd.h 7 2003-05-30 02:18:02Z gabest $
4 *
5 * Copyright (C) 1995-1999 RealNetworks, Inc. All rights reserved.
6 *
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
18 #endif
20 #ifndef _BASETSD_H_
21 #define _BASETSD_H_
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
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.
31 #if 0
32 typedef int LONG32;
33 typedef int INT32;
34 typedef unsigned int ULONG32;
35 typedef unsigned int UINT32;
36 #endif
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.
49 #ifdef _WIN64
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 */
67 #if !defined(__midl)
68 __inline
69 unsigned long
70 HandleToUlong(
71 void *h
74 return((unsigned long) h );
77 __inline
78 unsigned long
79 PtrToUlong(
80 void *p
83 return((unsigned long) p );
86 __inline
87 unsigned short
88 PtrToUshort(
89 void *p
92 return((unsigned short) p );
95 __inline
96 long
97 PtrToLong(
98 void *p
101 return((long) p );
104 __inline
105 short
106 PtrToShort(
107 void *p
110 return((short) p );
112 #endif
113 #pragma warning(3:4311) /* type cast truncation */
115 #else
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) )
138 #endif
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;
159 #ifdef __cplusplus
161 #endif
163 #endif /* _BASETSD_H_ */