2000-11-01 08:37:23 +08:00
|
|
|
#ifndef _BASETSD_H
|
|
|
|
#define _BASETSD_H
|
* include/accctrl.h, aclapi.h, basetsd.h, basetyps.h, cderr.h,
cguid.h, commctrl.h, commdlg.h, cpl.h, cplext.h, custcntl.h,
dbt.h, dde.h, ddeml.h, dlgs.h, excpt.h, httpext.h, imagehlp.h,
imm.h, initguid.h, intshcut.h, ipexport.h, iphlpapi.h,
ipifcons.h, iprtrmib.h, iptypes.h, isguids.h, largeint.h, lm.h,
lmaccess.h, lmalert.h, lmapibuf.h, lmat.h, lmaudit.h,
lmbrowsr.h, lmchdev.h, lmconfig.h, lmcons.h, lmerr.h,
lmerrlog.h, lmmsg.h, lmremutl.h, lmrepl.h, lmserver.h,
lmshare.h, lmsname.h, lmstats.h, lmsvc.h, lmuse.h, lmuseflg.h,
lmwksta.h, lzexpand.h, mapi.h, mciavi.h, mcx.h, mmsystem.h,
mswsock.h, nb30.h, nddeapi.h, nspapi.h, ntdef.h, ntsecapi.h,
ntsecpkg.h, oaidl.h, objbase.h, objfwd.h, objidl.h, odbcinst.h,
ole.h, ole2.h, ole2ver.h, oleauto.h, olectl.h, olectlid.h,
oledlg.h, oleidl.h, pbt.h, prsht.h, psapi.h, rapi.h, ras.h,
raserror.h, rassapi.h, regstr.h, richedit.h, richole.h, rpc.h,
rpcdce.h, rpcdce2.h, rpcdcep.h, rpcndr.h, rpcnsi.h, rpcnsip.h,
rpcnterr.h, rpcproxy.h, schannel.h, schnlsp.h, scrnsave.h,
security.h, setupapi.h, shellapi.h, shlguid.h, shlobj.h, sql.h,
sqlext.h, sqltypes.h, sqlucode.h, sspi.h, subauth.h,
tlhelp32.h, unknwn.h, userenv.h, w32api.h, winbase.h, wincon.h,
wincrypt.h, windef.h, windows.h, windowsx.h, winerror.h,
wingdi.h, wininet.h, winioctl.h, winnetwk.h, winnls.h, winnt.h,
winperf.h, winreg.h, winresrc.h, winsock.h, winsock2.h,
winspool.h, winsvc.h, winuser.h, winver.h, ws2tcpip.h,
wsnetbs.h, wtypes.h, zmouse.h: Add #pragma GCC system_header
if __GNUC__ >= 3.
* include/mapi.h: Change header guard name to _MAPI_H for
consistency.
2002-03-09 17:04:10 +08:00
|
|
|
#if __GNUC__ >=3
|
|
|
|
#pragma GCC system_header
|
|
|
|
#endif
|
2001-06-12 01:29:54 +08:00
|
|
|
|
2001-08-05 20:47:53 +08:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#ifndef __int64
|
|
|
|
#define __int64 long long
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2001-06-12 01:29:54 +08:00
|
|
|
#if defined(_WIN64)
|
|
|
|
#define __int3264 __int64
|
|
|
|
#define ADDRESS_TAG_BIT 0x40000000000UI64
|
|
|
|
#else /* !_WIN64 */
|
|
|
|
#define __int3264 __int32
|
|
|
|
#define ADDRESS_TAG_BIT 0x80000000UL
|
|
|
|
#define HandleToUlong( h ) ((ULONG)(ULONG_PTR)(h) )
|
|
|
|
#define HandleToLong( h ) ((LONG)(LONG_PTR) (h) )
|
|
|
|
#define LongToHandle( h) ((HANDLE)(LONG_PTR) (h))
|
|
|
|
#define PtrToUlong( p ) ((ULONG)(ULONG_PTR) (p) )
|
|
|
|
#define PtrToLong( p ) ((LONG)(LONG_PTR) (p) )
|
|
|
|
#define PtrToUint( p ) ((UINT)(UINT_PTR) (p) )
|
|
|
|
#define PtrToInt( p ) ((INT)(INT_PTR) (p) )
|
|
|
|
#define PtrToUshort( p ) ((unsigned short)(ULONG_PTR)(p) )
|
|
|
|
#define PtrToShort( p ) ((short)(LONG_PTR)(p) )
|
|
|
|
#define IntToPtr( i ) ((VOID*)(INT_PTR)((int)i))
|
|
|
|
#define UIntToPtr( ui ) ((VOID*)(UINT_PTR)((unsigned int)ui))
|
|
|
|
#define LongToPtr( l ) ((VOID*)(LONG_PTR)((long)l))
|
|
|
|
#define ULongToPtr( ul ) ((VOID*)(ULONG_PTR)((unsigned long)ul))
|
|
|
|
#endif /* !_WIN64 */
|
|
|
|
|
|
|
|
#define UlongToPtr(ul) ULongToPtr(ul)
|
|
|
|
#define UintToPtr(ui) UIntToPtr(ui)
|
|
|
|
#define MAXUINT_PTR (~((UINT_PTR)0))
|
|
|
|
#define MAXINT_PTR ((INT_PTR)(MAXUINT_PTR >> 1))
|
|
|
|
#define MININT_PTR (~MAXINT_PTR)
|
|
|
|
#define MAXULONG_PTR (~((ULONG_PTR)0))
|
|
|
|
#define MAXLONG_PTR ((LONG_PTR)(MAXULONG_PTR >> 1))
|
|
|
|
#define MINLONG_PTR (~MAXLONG_PTR)
|
|
|
|
#define MAXUHALF_PTR ((UHALF_PTR)~0)
|
|
|
|
#define MAXHALF_PTR ((HALF_PTR)(MAXUHALF_PTR >> 1))
|
|
|
|
#define MINHALF_PTR (~MAXHALF_PTR)
|
|
|
|
|
|
|
|
#ifndef RC_INVOKED
|
2000-11-01 08:37:23 +08:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
typedef int LONG32, *PLONG32;
|
2001-03-30 21:22:17 +08:00
|
|
|
#ifndef XFree86Server
|
2000-11-01 08:37:23 +08:00
|
|
|
typedef int INT32, *PINT32;
|
2001-03-30 21:22:17 +08:00
|
|
|
#endif /* ndef XFree86Server */
|
2000-11-01 08:37:23 +08:00
|
|
|
typedef unsigned int ULONG32, *PULONG32;
|
|
|
|
typedef unsigned int DWORD32, *PDWORD32;
|
|
|
|
typedef unsigned int UINT32, *PUINT32;
|
|
|
|
|
|
|
|
#if defined(_WIN64)
|
|
|
|
typedef __int64 INT_PTR, *PINT_PTR;
|
|
|
|
typedef unsigned __int64 UINT_PTR, *PUINT_PTR;
|
|
|
|
typedef __int64 LONG_PTR, *PLONG_PTR;
|
|
|
|
typedef unsigned __int64 ULONG_PTR, *PULONG_PTR;
|
|
|
|
typedef unsigned __int64 HANDLE_PTR;
|
|
|
|
typedef unsigned int UHALF_PTR, *PUHALF_PTR;
|
|
|
|
typedef int HALF_PTR, *PHALF_PTR;
|
|
|
|
|
|
|
|
#if 0 /* TODO when WIN64 is here */
|
|
|
|
inline unsigned long HandleToUlong(const void* h )
|
|
|
|
{ return((unsigned long) h ); }
|
|
|
|
inline long HandleToLong( const void* h )
|
|
|
|
{ return((long) h ); }
|
|
|
|
inline void* LongToHandle( const long h )
|
|
|
|
{ return((void*) (INT_PTR) h ); }
|
|
|
|
inline unsigned long PtrToUlong( const void* p)
|
|
|
|
{ return((unsigned long) p ); }
|
|
|
|
inline unsigned int PtrToUint( const void* p )
|
|
|
|
{ return((unsigned int) p ); }
|
|
|
|
inline unsigned short PtrToUshort( const void* p )
|
|
|
|
{ return((unsigned short) p ); }
|
|
|
|
inline long PtrToLong( const void* p )
|
|
|
|
{ return((long) p ); }
|
|
|
|
inline int PtrToInt( const void* p )
|
|
|
|
{ return((int) p ); }
|
|
|
|
inline short PtrToShort( const void* p )
|
|
|
|
{ return((short) p ); }
|
|
|
|
inline void* IntToPtr( const int i )
|
|
|
|
{ return( (void*)(INT_PTR)i ); }
|
|
|
|
inline void* UIntToPtr(const unsigned int ui)
|
|
|
|
{ return( (void*)(UINT_PTR)ui ); }
|
|
|
|
inline void* LongToPtr( const long l )
|
|
|
|
{ return( (void*)(LONG_PTR)l ); }
|
|
|
|
inline void* ULongToPtr( const unsigned long ul )
|
|
|
|
{ return( (void*)(ULONG_PTR)ul ); }
|
|
|
|
#endif /* 0_ */
|
|
|
|
|
|
|
|
#else /* !_WIN64 */
|
|
|
|
typedef int INT_PTR, *PINT_PTR;
|
|
|
|
typedef unsigned int UINT_PTR, *PUINT_PTR;
|
|
|
|
typedef long LONG_PTR, *PLONG_PTR;
|
|
|
|
typedef unsigned long ULONG_PTR, *PULONG_PTR;
|
|
|
|
typedef unsigned short UHALF_PTR, *PUHALF_PTR;
|
|
|
|
typedef short HALF_PTR, *PHALF_PTR;
|
|
|
|
typedef unsigned long HANDLE_PTR;
|
|
|
|
#endif /* !_WIN64 */
|
|
|
|
|
|
|
|
typedef ULONG_PTR SIZE_T, *PSIZE_T;
|
|
|
|
typedef LONG_PTR SSIZE_T, *PSSIZE_T;
|
|
|
|
typedef ULONG_PTR DWORD_PTR, *PDWORD_PTR;
|
|
|
|
typedef __int64 LONG64, *PLONG64;
|
|
|
|
typedef __int64 INT64, *PINT64;
|
|
|
|
typedef unsigned __int64 ULONG64, *PULONG64;
|
|
|
|
typedef unsigned __int64 DWORD64, *PDWORD64;
|
|
|
|
typedef unsigned __int64 UINT64, *PUINT64;
|
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
2001-06-12 01:29:54 +08:00
|
|
|
#endif /* !RC_INVOKED */
|
2000-11-01 08:37:23 +08:00
|
|
|
|
|
|
|
#endif /* _BASETSD_H */
|