2005-05-08 17:44:37 +00:00
|
|
|
#ifndef _WINDEF_H
|
|
|
|
#define _WINDEF_H
|
|
|
|
|
Merge from amd64 branch:
40122 mmsystem.h: 64bit build fixes. (Samuel Serapión)
40123 mmsystem.h: Even more 64bit fixes. (Samuel Serapión)
40155 mmddk.h/mmsystem.h: Fix ACMDRVSTREAMINSTANCE, ACMDRVSTREAMHEADER, PORTALLOC, WAVEOPENDESC, MIDIOPENDESC, MIXEROPENDESC structures. Fix ACMFILTERENUMCBA/W, ACMFILTERTAGENUMCBA/W, ACMFORMATENUMCA/W, ACMFORMATTAGENUMCBA/W callbacks. Fix acmDriverEnum, acmFilterEnumA/W, acmFormatEnumA/W, acmFormatTagEnumA/W, acmStreamOpen, CloseDriver, OpenDriver, SendDriverMessage, mmTaskSignal, mmGetCurrentTask (Samuel Serapión)
40995 sqltypes.h: 64bit fixes for sqltype.h, also resort and cleanup (Timo Kreuzer)
40996 msacm.h: Fix tag of ACMFILTERCHOOSEA (Timo Kreuzer)
41029 sql.h: Fix SQLFetchScroll prototype. (Timo Kreuzer)
41045 commdlg.h: fix and update definition of OPENFILENAMEAW (Timo Kreuzer)
41449 basetsd.h: Disable wine hack for amd64 (Timo Kreuzer)
43506 wincrypt.h: Fix definition of CryptReleaseContext (Timo Kreuzer)
43840 wingdi.h: Fix LOGBRUSH definition. (Samuel Serapión)
43907 commctrl.h: Fix bad cast. (Timo Kreuzer)
44039 mmddk.h: Fix mmTaskCreate and mciGetDriverData prototypes per MSDN (Timo Kreuzer)
44040 windef.h/winsock.h/winsock2.h: Fix 32bit build. (Samuel Serapión)
44044 ws2spi.h: Fix ws2_32 64bit build (Samuel Serapión)
44294 winnt.h: Fix SLIST_ENTRY for WIN64 (Timo Kreuzer)
44338 winnt.h: fix build. (Samuel Serapión)
44460 winuser.h: Define PHDEVNOTIFY, PDLGITEMTEMPLATEA/W, LPDLGITEMTEMPLATEA/W, PPAINTSTRUCT, PMENUITEMTEMPLATE, PUSEROBJECTFLAGS, PMINIMIZEDMETRICS, PNONCLIENTMETRICSA/W, LPMOUSEINPUT, LPKEYBDINPUT, LPHARDWAREINPUT. Add HARDWAREHOOKSTRUCT structure. (Samuel Serapión)
svn path=/trunk/; revision=44614
2009-12-15 23:23:01 +00:00
|
|
|
#ifndef _M_AMD64
|
2009-01-18 06:25:43 +00:00
|
|
|
#if !defined(__ROS_LONG64__)
|
|
|
|
#ifdef __WINESRC__
|
|
|
|
#define __ROS_LONG64__
|
|
|
|
#endif
|
|
|
|
#endif
|
Merge from amd64 branch:
40122 mmsystem.h: 64bit build fixes. (Samuel Serapión)
40123 mmsystem.h: Even more 64bit fixes. (Samuel Serapión)
40155 mmddk.h/mmsystem.h: Fix ACMDRVSTREAMINSTANCE, ACMDRVSTREAMHEADER, PORTALLOC, WAVEOPENDESC, MIDIOPENDESC, MIXEROPENDESC structures. Fix ACMFILTERENUMCBA/W, ACMFILTERTAGENUMCBA/W, ACMFORMATENUMCA/W, ACMFORMATTAGENUMCBA/W callbacks. Fix acmDriverEnum, acmFilterEnumA/W, acmFormatEnumA/W, acmFormatTagEnumA/W, acmStreamOpen, CloseDriver, OpenDriver, SendDriverMessage, mmTaskSignal, mmGetCurrentTask (Samuel Serapión)
40995 sqltypes.h: 64bit fixes for sqltype.h, also resort and cleanup (Timo Kreuzer)
40996 msacm.h: Fix tag of ACMFILTERCHOOSEA (Timo Kreuzer)
41029 sql.h: Fix SQLFetchScroll prototype. (Timo Kreuzer)
41045 commdlg.h: fix and update definition of OPENFILENAMEAW (Timo Kreuzer)
41449 basetsd.h: Disable wine hack for amd64 (Timo Kreuzer)
43506 wincrypt.h: Fix definition of CryptReleaseContext (Timo Kreuzer)
43840 wingdi.h: Fix LOGBRUSH definition. (Samuel Serapión)
43907 commctrl.h: Fix bad cast. (Timo Kreuzer)
44039 mmddk.h: Fix mmTaskCreate and mciGetDriverData prototypes per MSDN (Timo Kreuzer)
44040 windef.h/winsock.h/winsock2.h: Fix 32bit build. (Samuel Serapión)
44044 ws2spi.h: Fix ws2_32 64bit build (Samuel Serapión)
44294 winnt.h: Fix SLIST_ENTRY for WIN64 (Timo Kreuzer)
44338 winnt.h: fix build. (Samuel Serapión)
44460 winuser.h: Define PHDEVNOTIFY, PDLGITEMTEMPLATEA/W, LPDLGITEMTEMPLATEA/W, PPAINTSTRUCT, PMENUITEMTEMPLATE, PUSEROBJECTFLAGS, PMINIMIZEDMETRICS, PNONCLIENTMETRICSA/W, LPMOUSEINPUT, LPKEYBDINPUT, LPHARDWAREINPUT. Add HARDWAREHOOKSTRUCT structure. (Samuel Serapión)
svn path=/trunk/; revision=44614
2009-12-15 23:23:01 +00:00
|
|
|
#endif
|
2009-01-18 06:25:43 +00:00
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2009-06-17 11:18:51 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(push)
|
|
|
|
#pragma warning(disable:4255)
|
|
|
|
#endif
|
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifndef WINVER
|
|
|
|
#define WINVER 0x0400
|
|
|
|
/*
|
|
|
|
* If you need Win32 API features newer the Win95 and WinNT then you must
|
|
|
|
* define WINVER before including windows.h or any other method of including
|
|
|
|
* the windef.h header.
|
|
|
|
*/
|
|
|
|
#endif
|
|
|
|
#ifndef _WIN32_WINNT
|
|
|
|
#define _WIN32_WINNT WINVER
|
|
|
|
/*
|
|
|
|
* There may be the need to define _WIN32_WINNT to a value different from
|
|
|
|
* the value of WINVER. I don't have any example of why you would do that.
|
|
|
|
* However, if you must then define _WIN32_WINNT to the value required before
|
|
|
|
* including windows.h or any other method of including the windef.h header.
|
|
|
|
*/
|
|
|
|
#endif
|
|
|
|
#ifndef WIN32
|
|
|
|
#define WIN32
|
|
|
|
#endif
|
|
|
|
#ifndef _WIN32
|
|
|
|
#define _WIN32
|
|
|
|
#endif
|
|
|
|
#define FAR
|
|
|
|
#define far
|
|
|
|
#define NEAR
|
|
|
|
#define near
|
|
|
|
#ifndef CONST
|
|
|
|
#define CONST const
|
|
|
|
#endif
|
|
|
|
#undef MAX_PATH
|
|
|
|
#define MAX_PATH 260
|
|
|
|
|
|
|
|
#ifndef NULL
|
|
|
|
#ifdef __cplusplus
|
|
|
|
#define NULL 0
|
|
|
|
#else
|
|
|
|
#define NULL ((void*)0)
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#ifndef FALSE
|
|
|
|
#define FALSE 0
|
|
|
|
#endif
|
|
|
|
#ifndef TRUE
|
|
|
|
#define TRUE 1
|
|
|
|
#endif
|
2010-02-27 18:34:13 +00:00
|
|
|
|
|
|
|
#ifndef IN
|
2005-05-08 17:44:37 +00:00
|
|
|
#define IN
|
2010-02-27 18:34:13 +00:00
|
|
|
#endif
|
|
|
|
#ifndef OUT
|
2005-05-08 17:44:37 +00:00
|
|
|
#define OUT
|
2010-02-27 18:34:13 +00:00
|
|
|
#endif
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifndef OPTIONAL
|
|
|
|
#define OPTIONAL
|
|
|
|
#endif
|
|
|
|
|
2007-04-20 02:30:53 +00:00
|
|
|
/* needed by header files generated by WIDL */
|
|
|
|
#ifdef __WINESRC__
|
|
|
|
#define WINE_NO_UNICODE_MACROS
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifdef WINE_NO_UNICODE_MACROS
|
|
|
|
# define WINELIB_NAME_AW(func) \
|
|
|
|
func##_must_be_suffixed_with_W_or_A_in_this_context \
|
|
|
|
func##_must_be_suffixed_with_W_or_A_in_this_context
|
|
|
|
#else /* WINE_NO_UNICODE_MACROS */
|
|
|
|
# ifdef UNICODE
|
|
|
|
# define WINELIB_NAME_AW(func) func##W
|
|
|
|
# else
|
|
|
|
# define WINELIB_NAME_AW(func) func##A
|
|
|
|
# endif
|
|
|
|
#endif /* WINE_NO_UNICODE_MACROS */
|
|
|
|
|
|
|
|
#ifdef WINE_NO_UNICODE_MACROS
|
|
|
|
# define DECL_WINELIB_TYPE_AW(type) /* nothing */
|
|
|
|
#else
|
|
|
|
# define DECL_WINELIB_TYPE_AW(type) typedef WINELIB_NAME_AW(type) type;
|
|
|
|
#endif
|
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define PACKED __attribute__((packed))
|
|
|
|
#ifndef _fastcall
|
|
|
|
#define _fastcall __attribute__((fastcall))
|
|
|
|
#endif
|
|
|
|
#ifndef __fastcall
|
|
|
|
#define __fastcall __attribute__((fastcall))
|
|
|
|
#endif
|
|
|
|
#ifndef _stdcall
|
|
|
|
#define _stdcall __attribute__((stdcall))
|
|
|
|
#endif
|
|
|
|
#ifndef __stdcall
|
|
|
|
#define __stdcall __attribute__((stdcall))
|
|
|
|
#endif
|
|
|
|
#ifndef _cdecl
|
|
|
|
#define _cdecl __attribute__((cdecl))
|
|
|
|
#endif
|
|
|
|
#ifndef __cdecl
|
|
|
|
#define __cdecl __attribute__((cdecl))
|
|
|
|
#endif
|
|
|
|
#ifndef __declspec
|
|
|
|
#define __declspec(e) __attribute__((e))
|
|
|
|
#endif
|
|
|
|
#ifndef _declspec
|
|
|
|
#define _declspec(e) __attribute__((e))
|
|
|
|
#endif
|
|
|
|
#elif defined(__WATCOMC__)
|
|
|
|
#define PACKED
|
|
|
|
#else
|
|
|
|
#define PACKED
|
|
|
|
#define _cdecl
|
|
|
|
#define __cdecl
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#undef pascal
|
|
|
|
#undef _pascal
|
|
|
|
#undef __pascal
|
|
|
|
#define pascal __stdcall
|
|
|
|
#define _pascal __stdcall
|
|
|
|
#define __pascal __stdcall
|
Merge 34739 - 34769, 34796 - 34905, 34916 - 34967, 34970 - 35135, 35167, 35325, 35326, 35443 - 35506, 35510 - 35546, 35587, 35616,
35644 from ros-amd64-bringup branch:
- Update AMD64 intrinsic Interlocked functions
- Add _InterlockedExchange64 to intin_x86.h
-Fix definitions of IsBadHugeReadPtr, IsBadHugeWritePtr, IsBadReadPtr, IsBadStringPtrA, IsBadStringPtrW, IsBadWritePtr and SetProcessWorkingSetSize
- Define CONTEXT and XMM_SAVE_AREA32, taken from WINE
- Include _M_AMD64 for defintitions in ioaccess.h
- Add Interlocked intrinisc definitions for AMD64 platform
- Add KI_USER_SHARED_DATA and KeGetCurrentIrql() prototype to winddh
- Fix prototypes for KfAcquireSpinLock, KfReleaseSpinLock, KeAcquireInStackQueuedSpinLock and KeReleaseInStackQueuedSpinLock on amd64
- Fix rotl declaration, add mysteriously missing rotr.
winnt.h:
- Fix CONTEXT_AMD64 and friends, add various constants.
- Define RUNTIME_FUNCTION, RtlCaptureContext, RtlRestoreContext, RtlAddFunctionTable, RtlInstallFunctionTableCallback, RtlDeleteFunctionTable.
- Fix definitions for EXCEPTION_RECORD and friends to support amd64.
- Define IMAGE_THUNK_DATA64 and related constants.
- Define IMAGE_TLS_DIRECTORY64 and related constants.
- Remove WINEisms
- Remove multiple declarations and minor fixes.
- Fix KESEG0_BASE for amd64
- Fix definition for NdisCopyLookaheadData on amd64
- Only add function prototypes if NO_INTERLOCKED_INTRINSICS is defined
- Move the inlined InterlockedAnd/Or from rtl to winbase.h and rename it to InterlockedAnd/Or_Inline
- Fix TreeView_EnsureVisible macro.
- Add missing 64 bit intrinsic Interlocked functions
- Fix _InterlockedDecrement64
- Fix InterlockedExchangeAddSizeT
- Fix __writecrx instrinsics
- Fix ExQueryPoolBlockSize prototype
- Make KI_USER_SHARED_DATA and IMAGE_ORDINAL_FLAG64 a ULONGLONG
- Fix definition if IMAGE_OPTIONAL_HEADER64
- Add KPCR structure
- Add __readcrx intrinsics
- Ad some definitions to winddk.h
- Add a field for a DbgPrint function pointer to the ROS_LOADER_PARAMETER_BLOCK for early debug prints in ntoskrnl
- Update KPCR and KIPCR
- Add KeGetPcr() and update KeGetCurrentProcessorNumber
- Fix SECURITY_DESCRIPTOR_RELATIVE and KDPC_DATA
- Implement byteswap intrinsics
- Add macro definitions for KeQuerySystemTime, KeQueryTickCount and KeQueryInterruptTime to ddk
- Add NtCurrentTeb inline function
- Update amd64 prototypes for KeGetCurrentIrql, KfRaiseIrql, KfLowerIrql, KeRaiseIrqlToDpcLevel, KeRaiseIrqlToSynchLevel, KeLowerIrql, KeRaiseIrql
- Implement __readcr8, __writecr8, __lidt and __sidt intrinsics.
- Implement KeGetCurrentIrql as intrinsic.
- Make KeGetCurrentIrql, KeLowerIrql, KfRaiseIrql, KeRaiseIrql, KeRaiseIrqlToDpcLevel and KeRaiseIrqlToSynchLevel intrinsics as in the WDK 2008.
- Fix _interlockedbittest intrinsics
- Fix __readmsr and __writemsr on amd64
- Fix __readgsqword, it was using a long internally. Add volatile keyword to segment addressing intrinsics. Add "memory" to clobber list on all those that do write.
- Merge __readcr and __writecr x86 / x64 definitions, because they are the same. Implement __readdr and __writedr for x64.
- __readcr3() returns an unsigned __int64, fix x86 MmGetPageDirectory accordingly.
svn path=/trunk/; revision=35646
2008-08-25 21:57:13 +00:00
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#define CDECL _cdecl
|
Merge 34739 - 34769, 34796 - 34905, 34916 - 34967, 34970 - 35135, 35167, 35325, 35326, 35443 - 35506, 35510 - 35546, 35587, 35616,
35644 from ros-amd64-bringup branch:
- Update AMD64 intrinsic Interlocked functions
- Add _InterlockedExchange64 to intin_x86.h
-Fix definitions of IsBadHugeReadPtr, IsBadHugeWritePtr, IsBadReadPtr, IsBadStringPtrA, IsBadStringPtrW, IsBadWritePtr and SetProcessWorkingSetSize
- Define CONTEXT and XMM_SAVE_AREA32, taken from WINE
- Include _M_AMD64 for defintitions in ioaccess.h
- Add Interlocked intrinisc definitions for AMD64 platform
- Add KI_USER_SHARED_DATA and KeGetCurrentIrql() prototype to winddh
- Fix prototypes for KfAcquireSpinLock, KfReleaseSpinLock, KeAcquireInStackQueuedSpinLock and KeReleaseInStackQueuedSpinLock on amd64
- Fix rotl declaration, add mysteriously missing rotr.
winnt.h:
- Fix CONTEXT_AMD64 and friends, add various constants.
- Define RUNTIME_FUNCTION, RtlCaptureContext, RtlRestoreContext, RtlAddFunctionTable, RtlInstallFunctionTableCallback, RtlDeleteFunctionTable.
- Fix definitions for EXCEPTION_RECORD and friends to support amd64.
- Define IMAGE_THUNK_DATA64 and related constants.
- Define IMAGE_TLS_DIRECTORY64 and related constants.
- Remove WINEisms
- Remove multiple declarations and minor fixes.
- Fix KESEG0_BASE for amd64
- Fix definition for NdisCopyLookaheadData on amd64
- Only add function prototypes if NO_INTERLOCKED_INTRINSICS is defined
- Move the inlined InterlockedAnd/Or from rtl to winbase.h and rename it to InterlockedAnd/Or_Inline
- Fix TreeView_EnsureVisible macro.
- Add missing 64 bit intrinsic Interlocked functions
- Fix _InterlockedDecrement64
- Fix InterlockedExchangeAddSizeT
- Fix __writecrx instrinsics
- Fix ExQueryPoolBlockSize prototype
- Make KI_USER_SHARED_DATA and IMAGE_ORDINAL_FLAG64 a ULONGLONG
- Fix definition if IMAGE_OPTIONAL_HEADER64
- Add KPCR structure
- Add __readcrx intrinsics
- Ad some definitions to winddk.h
- Add a field for a DbgPrint function pointer to the ROS_LOADER_PARAMETER_BLOCK for early debug prints in ntoskrnl
- Update KPCR and KIPCR
- Add KeGetPcr() and update KeGetCurrentProcessorNumber
- Fix SECURITY_DESCRIPTOR_RELATIVE and KDPC_DATA
- Implement byteswap intrinsics
- Add macro definitions for KeQuerySystemTime, KeQueryTickCount and KeQueryInterruptTime to ddk
- Add NtCurrentTeb inline function
- Update amd64 prototypes for KeGetCurrentIrql, KfRaiseIrql, KfLowerIrql, KeRaiseIrqlToDpcLevel, KeRaiseIrqlToSynchLevel, KeLowerIrql, KeRaiseIrql
- Implement __readcr8, __writecr8, __lidt and __sidt intrinsics.
- Implement KeGetCurrentIrql as intrinsic.
- Make KeGetCurrentIrql, KeLowerIrql, KfRaiseIrql, KeRaiseIrql, KeRaiseIrqlToDpcLevel and KeRaiseIrqlToSynchLevel intrinsics as in the WDK 2008.
- Fix _interlockedbittest intrinsics
- Fix __readmsr and __writemsr on amd64
- Fix __readgsqword, it was using a long internally. Add volatile keyword to segment addressing intrinsics. Add "memory" to clobber list on all those that do write.
- Merge __readcr and __writecr x86 / x64 definitions, because they are the same. Implement __readdr and __writedr for x64.
- __readcr3() returns an unsigned __int64, fix x86 MmGetPageDirectory accordingly.
svn path=/trunk/; revision=35646
2008-08-25 21:57:13 +00:00
|
|
|
|
|
|
|
#if !defined(__x86_64__) //defined(_STDCALL_SUPPORTED)
|
|
|
|
#define CALLBACK __stdcall
|
|
|
|
#define WINAPI __stdcall
|
|
|
|
#define WINAPIV __cdecl
|
|
|
|
#define APIENTRY WINAPI
|
|
|
|
#define APIPRIVATE __stdcall
|
|
|
|
#define PASCAL __stdcall
|
|
|
|
#else
|
|
|
|
#define CALLBACK
|
|
|
|
#define WINAPI
|
|
|
|
#define WINAPIV
|
|
|
|
#define APIENTRY WINAPI
|
|
|
|
#define APIPRIVATE
|
|
|
|
#define PASCAL pascal
|
|
|
|
#endif
|
2005-05-08 17:44:37 +00:00
|
|
|
|
|
|
|
#define DECLSPEC_IMPORT __declspec(dllimport)
|
|
|
|
#define DECLSPEC_EXPORT __declspec(dllexport)
|
2008-12-24 23:31:09 +00:00
|
|
|
#ifndef DECLSPEC_NOINLINE
|
|
|
|
#if (_MSC_VER >= 1300)
|
|
|
|
#define DECLSPEC_NOINLINE __declspec(noinline)
|
|
|
|
#elif defined(__GNUC__)
|
|
|
|
#define DECLSPEC_NOINLINE __attribute__((noinline))
|
|
|
|
#else
|
|
|
|
#define DECLSPEC_NOINLINE
|
|
|
|
#endif
|
|
|
|
#endif
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifdef __GNUC__
|
|
|
|
#define DECLSPEC_NORETURN __declspec(noreturn)
|
|
|
|
#define DECLARE_STDCALL_P( type ) __stdcall type
|
|
|
|
#elif defined(__WATCOMC__)
|
|
|
|
#define DECLSPEC_NORETURN
|
|
|
|
#define DECLARE_STDCALL_P( type ) type __stdcall
|
2005-06-21 23:42:58 +00:00
|
|
|
#elif defined(_MSC_VER)
|
|
|
|
#define DECLSPEC_NORETURN __declspec(noreturn)
|
|
|
|
#define DECLARE_STDCALL_P( type ) type __stdcall
|
2005-05-08 17:44:37 +00:00
|
|
|
#endif /* __GNUC__/__WATCOMC__ */
|
|
|
|
#define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8)))
|
|
|
|
#define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16)))
|
2007-01-19 09:26:20 +00:00
|
|
|
#define LOWORD(l) ((WORD)((DWORD_PTR)(l)))
|
|
|
|
#define HIWORD(l) ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF))
|
2005-05-08 17:44:37 +00:00
|
|
|
#define LOBYTE(w) ((BYTE)(w))
|
|
|
|
#define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))
|
|
|
|
|
|
|
|
#ifndef __WATCOMC__
|
|
|
|
#ifndef _export
|
|
|
|
#define _export
|
|
|
|
#endif
|
|
|
|
#ifndef __export
|
|
|
|
#define __export
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2008-02-27 14:57:47 +00:00
|
|
|
#ifndef NOMINMAX
|
|
|
|
#ifndef max
|
|
|
|
#define max(a,b) ((a)>(b)?(a):(b))
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef min
|
|
|
|
#define min(a,b) ((a)<(b)?(a):(b))
|
|
|
|
#endif
|
2005-05-08 17:44:37 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
#define UNREFERENCED_PARAMETER(P) {(P)=(P);}
|
|
|
|
#define UNREFERENCED_LOCAL_VARIABLE(L) {(L)=(L);}
|
|
|
|
#define DBG_UNREFERENCED_PARAMETER(P)
|
|
|
|
#define DBG_UNREFERENCED_LOCAL_VARIABLE(L)
|
|
|
|
|
2010-02-27 14:43:32 +00:00
|
|
|
#ifndef __ANONYMOUS_DEFINED
|
|
|
|
#define __ANONYMOUS_DEFINED
|
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifndef NONAMELESSUNION
|
2009-08-01 19:10:16 +00:00
|
|
|
#ifdef __GNUC__
|
2005-05-08 17:44:37 +00:00
|
|
|
#define _ANONYMOUS_UNION __extension__
|
|
|
|
#define _ANONYMOUS_STRUCT __extension__
|
2005-06-21 23:42:58 +00:00
|
|
|
#elif defined(__WATCOMC__) || defined(_MSC_VER)
|
2005-05-08 17:44:37 +00:00
|
|
|
#define _ANONYMOUS_UNION
|
|
|
|
#define _ANONYMOUS_STRUCT
|
|
|
|
#endif /* __GNUC__/__WATCOMC__ */
|
2009-08-01 19:10:16 +00:00
|
|
|
#endif /* NONAMELESSUNION */
|
2005-05-08 17:44:37 +00:00
|
|
|
|
|
|
|
#ifndef _ANONYMOUS_UNION
|
|
|
|
#define _ANONYMOUS_UNION
|
|
|
|
#define _UNION_NAME(x) x
|
|
|
|
#define DUMMYUNIONNAME u
|
2006-07-03 07:43:28 +00:00
|
|
|
#define DUMMYUNIONNAME1 u1
|
2005-05-08 17:44:37 +00:00
|
|
|
#define DUMMYUNIONNAME2 u2
|
|
|
|
#define DUMMYUNIONNAME3 u3
|
|
|
|
#define DUMMYUNIONNAME4 u4
|
|
|
|
#define DUMMYUNIONNAME5 u5
|
|
|
|
#define DUMMYUNIONNAME6 u6
|
|
|
|
#define DUMMYUNIONNAME7 u7
|
|
|
|
#define DUMMYUNIONNAME8 u8
|
|
|
|
#else
|
|
|
|
#define _UNION_NAME(x)
|
|
|
|
#define DUMMYUNIONNAME
|
2006-07-03 07:43:28 +00:00
|
|
|
#define DUMMYUNIONNAME1
|
2005-05-08 17:44:37 +00:00
|
|
|
#define DUMMYUNIONNAME2
|
|
|
|
#define DUMMYUNIONNAME3
|
|
|
|
#define DUMMYUNIONNAME4
|
|
|
|
#define DUMMYUNIONNAME5
|
|
|
|
#define DUMMYUNIONNAME6
|
|
|
|
#define DUMMYUNIONNAME7
|
|
|
|
#define DUMMYUNIONNAME8
|
|
|
|
#endif
|
|
|
|
#ifndef _ANONYMOUS_STRUCT
|
|
|
|
#define _ANONYMOUS_STRUCT
|
|
|
|
#define _STRUCT_NAME(x) x
|
|
|
|
#define DUMMYSTRUCTNAME s
|
2006-07-03 07:43:28 +00:00
|
|
|
#define DUMMYSTRUCTNAME1 s1
|
2005-05-08 17:44:37 +00:00
|
|
|
#define DUMMYSTRUCTNAME2 s2
|
|
|
|
#define DUMMYSTRUCTNAME3 s3
|
2006-07-03 07:43:28 +00:00
|
|
|
#define DUMMYSTRUCTNAME4 s4
|
|
|
|
#define DUMMYSTRUCTNAME5 s5
|
2005-05-08 17:44:37 +00:00
|
|
|
#else
|
|
|
|
#define _STRUCT_NAME(x)
|
|
|
|
#define DUMMYSTRUCTNAME
|
2006-07-03 07:43:28 +00:00
|
|
|
#define DUMMYSTRUCTNAME1
|
2005-05-08 17:44:37 +00:00
|
|
|
#define DUMMYSTRUCTNAME2
|
|
|
|
#define DUMMYSTRUCTNAME3
|
2006-07-03 07:43:28 +00:00
|
|
|
#define DUMMYSTRUCTNAME4
|
|
|
|
#define DUMMYSTRUCTNAME5
|
2005-05-08 17:44:37 +00:00
|
|
|
#endif
|
|
|
|
|
2010-02-27 14:43:32 +00:00
|
|
|
#endif /* __ANONYMOUS_DEFINED */
|
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifndef NO_STRICT
|
|
|
|
#ifndef STRICT
|
|
|
|
#define STRICT 1
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
2005-09-15 05:58:49 +00:00
|
|
|
#ifndef DWORD_DEFINED
|
|
|
|
#define DWORD_DEFINED
|
2009-01-18 06:25:43 +00:00
|
|
|
#ifndef __ROS_LONG64__
|
2005-09-15 05:58:49 +00:00
|
|
|
typedef unsigned long DWORD;
|
2009-01-18 06:25:43 +00:00
|
|
|
#else
|
|
|
|
typedef unsigned int DWORD;
|
|
|
|
#endif
|
2005-09-15 05:58:49 +00:00
|
|
|
#endif//DWORD_DEFINED
|
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef int WINBOOL,*PWINBOOL,*LPWINBOOL;
|
|
|
|
/* FIXME: Is there a good solution to this? */
|
|
|
|
#ifndef XFree86Server
|
|
|
|
#ifndef __OBJC__
|
|
|
|
typedef WINBOOL BOOL;
|
|
|
|
#else
|
|
|
|
#define BOOL WINBOOL
|
|
|
|
#endif
|
|
|
|
typedef unsigned char BYTE;
|
|
|
|
#endif /* ndef XFree86Server */
|
|
|
|
typedef BOOL *PBOOL,*LPBOOL;
|
|
|
|
typedef unsigned short WORD;
|
|
|
|
typedef float FLOAT;
|
|
|
|
typedef FLOAT *PFLOAT;
|
|
|
|
typedef BYTE *PBYTE,*LPBYTE;
|
|
|
|
typedef int *PINT,*LPINT;
|
|
|
|
typedef WORD *PWORD,*LPWORD;
|
2009-01-18 06:25:43 +00:00
|
|
|
#ifndef __ROS_LONG64__
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef long *LPLONG;
|
2009-01-18 06:25:43 +00:00
|
|
|
#else
|
|
|
|
typedef int *LPLONG;
|
|
|
|
#endif
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef DWORD *PDWORD,*LPDWORD;
|
2010-03-25 23:40:31 +00:00
|
|
|
typedef CONST void *LPCVOID;
|
2008-11-29 10:49:36 +00:00
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef unsigned int UINT,*PUINT,*LPUINT;
|
|
|
|
|
2008-11-29 10:49:36 +00:00
|
|
|
typedef void *LPVOID;
|
|
|
|
|
2009-01-21 15:57:21 +00:00
|
|
|
#ifndef __ms_va_list
|
|
|
|
# if defined(__x86_64__) && defined (__GNUC__)
|
|
|
|
# define __ms_va_list __builtin_ms_va_list
|
|
|
|
# define __ms_va_start(list,arg) __builtin_ms_va_start(list,arg)
|
|
|
|
# define __ms_va_end(list) __builtin_ms_va_end(list)
|
|
|
|
# else
|
|
|
|
# define __ms_va_list va_list
|
|
|
|
# define __ms_va_start(list,arg) va_start(list,arg)
|
|
|
|
# define __ms_va_end(list) va_end(list)
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2008-11-29 10:49:36 +00:00
|
|
|
//
|
|
|
|
// Check if ntdef.h already defined these for us
|
|
|
|
//
|
|
|
|
#ifndef BASETYPES
|
|
|
|
#define BASETYPES
|
2009-01-18 06:25:43 +00:00
|
|
|
#ifndef __ROS_LONG64__
|
2008-11-29 10:49:36 +00:00
|
|
|
typedef unsigned long ULONG, *PULONG;
|
2009-01-18 06:25:43 +00:00
|
|
|
#else
|
|
|
|
typedef unsigned int ULONG, *PULONG;
|
|
|
|
#endif
|
2008-11-29 10:49:36 +00:00
|
|
|
typedef unsigned short USHORT, *PUSHORT;
|
|
|
|
typedef unsigned char UCHAR, *PUCHAR;
|
|
|
|
typedef char *PSZ;
|
|
|
|
typedef int INT;
|
|
|
|
#endif /* BASETYPES */
|
|
|
|
|
2005-11-28 23:43:40 +00:00
|
|
|
#ifndef NT_INCLUDED
|
2005-05-08 17:44:37 +00:00
|
|
|
#include <winnt.h>
|
2005-11-28 23:43:40 +00:00
|
|
|
#endif
|
2005-05-08 17:44:37 +00:00
|
|
|
|
2008-11-29 10:49:36 +00:00
|
|
|
typedef HANDLE *LPHANDLE;
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef UINT_PTR WPARAM;
|
|
|
|
typedef LONG_PTR LPARAM;
|
|
|
|
typedef LONG_PTR LRESULT;
|
|
|
|
#ifndef _HRESULT_DEFINED
|
|
|
|
typedef LONG HRESULT;
|
|
|
|
#define _HRESULT_DEFINED
|
|
|
|
#endif
|
|
|
|
#ifndef XFree86Server
|
|
|
|
typedef WORD ATOM;
|
|
|
|
#endif /* XFree86Server */
|
|
|
|
typedef HANDLE HGLOBAL;
|
|
|
|
typedef HANDLE HLOCAL;
|
|
|
|
typedef HANDLE GLOBALHANDLE;
|
|
|
|
typedef HANDLE LOCALHANDLE;
|
|
|
|
typedef void *HGDIOBJ;
|
|
|
|
DECLARE_HANDLE(HACCEL);
|
|
|
|
DECLARE_HANDLE(HBITMAP);
|
|
|
|
DECLARE_HANDLE(HBRUSH);
|
|
|
|
DECLARE_HANDLE(HCOLORSPACE);
|
|
|
|
DECLARE_HANDLE(HDC);
|
|
|
|
DECLARE_HANDLE(HGLRC);
|
|
|
|
DECLARE_HANDLE(HDESK);
|
|
|
|
DECLARE_HANDLE(HENHMETAFILE);
|
|
|
|
DECLARE_HANDLE(HFONT);
|
|
|
|
DECLARE_HANDLE(HICON);
|
|
|
|
DECLARE_HANDLE(HKEY);
|
|
|
|
/* FIXME: How to handle these. SM_CMONITORS etc in winuser.h also. */
|
|
|
|
/* #if (WINVER >= 0x0500) */
|
|
|
|
DECLARE_HANDLE(HMONITOR);
|
2005-11-05 06:44:03 +00:00
|
|
|
DECLARE_HANDLE(HUMPD);
|
2005-05-08 17:44:37 +00:00
|
|
|
#define HMONITOR_DECLARED 1
|
|
|
|
DECLARE_HANDLE(HTERMINAL);
|
|
|
|
DECLARE_HANDLE(HWINEVENTHOOK);
|
|
|
|
/* #endif */
|
|
|
|
typedef HKEY *PHKEY;
|
|
|
|
DECLARE_HANDLE(HMENU);
|
|
|
|
DECLARE_HANDLE(HMETAFILE);
|
|
|
|
DECLARE_HANDLE(HINSTANCE);
|
|
|
|
typedef HINSTANCE HMODULE;
|
|
|
|
DECLARE_HANDLE(HPALETTE);
|
|
|
|
DECLARE_HANDLE(HPEN);
|
|
|
|
DECLARE_HANDLE(HRGN);
|
|
|
|
DECLARE_HANDLE(HRSRC);
|
|
|
|
DECLARE_HANDLE(HSTR);
|
|
|
|
DECLARE_HANDLE(HTASK);
|
|
|
|
DECLARE_HANDLE(HWND);
|
|
|
|
DECLARE_HANDLE(HWINSTA);
|
|
|
|
DECLARE_HANDLE(HKL);
|
|
|
|
typedef int HFILE;
|
|
|
|
typedef HICON HCURSOR;
|
|
|
|
typedef DWORD COLORREF;
|
merge from amd64 branch. and
35645: Fix some wrong declarations for 64bits. (Samuel Serapión)
35652: More header fixes. (Samuel Serapión)
35950: Implement __readeflags and __writeeflags (Timo Kreuzer)
35951: Remove hacks from __addgsbyte, __addgsword, __addgsdword. (Timo Kreuzer)
36171: Fix TIMERPROC definition. Fix CreateToolbarEx definition. (Samuel Serapión)
36468: Add MemoryBarrier definition for amd64 (Timo Kreuzer)
36469: Fix NetLocalGroupGetMembers prototype. (Samuel Serapión)
36474: Fix ReadProcessMemory and Toolhelp32ReadProcessMemory prototypes. (Samuel Serapión)
36840: fix __rdtsc on amd64 build (Timo Kreuzer)
36898: Fix CryptReleaseContext definition. (Samuel Serapión)
36900: Fix COMBOBOXEXITEA/W noticed by Daniel Verkamp. (Samuel Serapión)
36901: Fix NMHDR definition. noticed by Daniel Verkamp. (Samuel Serapión)
36906: Fix definitions of CDHOOKPROC, PROC, FARPROC, NEARPROC, SYSTEM_INFO, COMPAREITEMSTRUCT, COPYDATASTRUCT, DELETEITEMSTRUCT, DRAWITEMSTRUCT, MENUITEMINFOA/W, HELPINFO, MSGBOXPARAMSA/W, MOUSEHOOKSTRUCT, DROPSTRUCT, KBDLLHOOKSTRUCT, GetProcessAffinityMask, SetProcessAffinityMask, DragObject, InsertMenuA/W, ModifyMenuA/W, WinHelpA/W, RT_GROUP_CURSOR, RT_GROUP_ICON (Daniel Verkamp.)
36953: Fix AFD compilation for 64-bit (treat handles as ULONG_PTR-sized). Also correct Winsock's SOCKET definition (Stefan Ginsberg)
37307: Add UNWIND_HISTORY_TABLE_ENTRY and UNWIND_HISTORY_TABLE. (Timo Kreuzer)
37875: Inlcude excpt.h in winnt.h. (Timo Kreuzer)
37908: Fix definition of SOCKET. (Timo Kreuzer)
37926: fix *HOOKPROC definition. Add 64 bit BitTest functions. (Timo Kreuzer)
38072: Fix FARPROC, NEARPROC, PROC definitions (Samuel Serapión)
38091: Fix some 64bit portability issues. (Samuel Serapión)
38093: Hack for wine specific hack. (Samuel Serapión)
38095: Fix packing for commdlg. (Samuel Serapión)
38260: Fix EDITSTREAM structure. (Samuel Serapión)
38263: Fix definitions of WAVEOPENDESC, WAVEHDR structures. Fix prototypes for DefDriverProc, waveOutMessage, waveOutGetDevCapsA/W, waveInGetDevCapsA/W, waveInMessage, midiStreamOpen, midiOutGetDevCapsA/W, midiOutOpen, midiOutMessage, midiInGetDevCapsA/W, midiInOpen, midiInMessage, auxGetDevCapsA/W, auxOutMessage, mixerGetDevCapsA/W, mixerOpen, timeSetEvent, joyGetDevCapsA/W, mciSendCommandA/W, and mciGetCreatorTask. (Samuel Serapión)
38478: Fix HeapAlloc prototype. (Timo Kreuzer)
39468: Fix some definitions in mmsystem.h (Timo Kreuzer)
svn path=/trunk/; revision=39471
2009-02-08 03:41:29 +00:00
|
|
|
#ifdef _WIN64
|
|
|
|
typedef INT_PTR (FAR WINAPI *FARPROC)();
|
|
|
|
typedef INT_PTR (NEAR WINAPI *NEARPROC)();
|
|
|
|
typedef INT_PTR (WINAPI *PROC)();
|
|
|
|
#else
|
|
|
|
typedef int (FAR WINAPI *FARPROC)();
|
|
|
|
typedef int (NEAR WINAPI *NEARPROC)();
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef int (WINAPI *PROC)();
|
merge from amd64 branch. and
35645: Fix some wrong declarations for 64bits. (Samuel Serapión)
35652: More header fixes. (Samuel Serapión)
35950: Implement __readeflags and __writeeflags (Timo Kreuzer)
35951: Remove hacks from __addgsbyte, __addgsword, __addgsdword. (Timo Kreuzer)
36171: Fix TIMERPROC definition. Fix CreateToolbarEx definition. (Samuel Serapión)
36468: Add MemoryBarrier definition for amd64 (Timo Kreuzer)
36469: Fix NetLocalGroupGetMembers prototype. (Samuel Serapión)
36474: Fix ReadProcessMemory and Toolhelp32ReadProcessMemory prototypes. (Samuel Serapión)
36840: fix __rdtsc on amd64 build (Timo Kreuzer)
36898: Fix CryptReleaseContext definition. (Samuel Serapión)
36900: Fix COMBOBOXEXITEA/W noticed by Daniel Verkamp. (Samuel Serapión)
36901: Fix NMHDR definition. noticed by Daniel Verkamp. (Samuel Serapión)
36906: Fix definitions of CDHOOKPROC, PROC, FARPROC, NEARPROC, SYSTEM_INFO, COMPAREITEMSTRUCT, COPYDATASTRUCT, DELETEITEMSTRUCT, DRAWITEMSTRUCT, MENUITEMINFOA/W, HELPINFO, MSGBOXPARAMSA/W, MOUSEHOOKSTRUCT, DROPSTRUCT, KBDLLHOOKSTRUCT, GetProcessAffinityMask, SetProcessAffinityMask, DragObject, InsertMenuA/W, ModifyMenuA/W, WinHelpA/W, RT_GROUP_CURSOR, RT_GROUP_ICON (Daniel Verkamp.)
36953: Fix AFD compilation for 64-bit (treat handles as ULONG_PTR-sized). Also correct Winsock's SOCKET definition (Stefan Ginsberg)
37307: Add UNWIND_HISTORY_TABLE_ENTRY and UNWIND_HISTORY_TABLE. (Timo Kreuzer)
37875: Inlcude excpt.h in winnt.h. (Timo Kreuzer)
37908: Fix definition of SOCKET. (Timo Kreuzer)
37926: fix *HOOKPROC definition. Add 64 bit BitTest functions. (Timo Kreuzer)
38072: Fix FARPROC, NEARPROC, PROC definitions (Samuel Serapión)
38091: Fix some 64bit portability issues. (Samuel Serapión)
38093: Hack for wine specific hack. (Samuel Serapión)
38095: Fix packing for commdlg. (Samuel Serapión)
38260: Fix EDITSTREAM structure. (Samuel Serapión)
38263: Fix definitions of WAVEOPENDESC, WAVEHDR structures. Fix prototypes for DefDriverProc, waveOutMessage, waveOutGetDevCapsA/W, waveInGetDevCapsA/W, waveInMessage, midiStreamOpen, midiOutGetDevCapsA/W, midiOutOpen, midiOutMessage, midiInGetDevCapsA/W, midiInOpen, midiInMessage, auxGetDevCapsA/W, auxOutMessage, mixerGetDevCapsA/W, mixerOpen, timeSetEvent, joyGetDevCapsA/W, mciSendCommandA/W, and mciGetCreatorTask. (Samuel Serapión)
38478: Fix HeapAlloc prototype. (Timo Kreuzer)
39468: Fix some definitions in mmsystem.h (Timo Kreuzer)
svn path=/trunk/; revision=39471
2009-02-08 03:41:29 +00:00
|
|
|
#endif
|
2005-05-08 17:44:37 +00:00
|
|
|
typedef struct tagRECT {
|
|
|
|
LONG left;
|
|
|
|
LONG top;
|
|
|
|
LONG right;
|
|
|
|
LONG bottom;
|
|
|
|
} RECT,*PRECT,*LPRECT;
|
|
|
|
typedef const RECT *LPCRECT;
|
|
|
|
typedef struct tagRECTL {
|
|
|
|
LONG left;
|
|
|
|
LONG top;
|
|
|
|
LONG right;
|
|
|
|
LONG bottom;
|
|
|
|
} RECTL,*PRECTL,*LPRECTL;
|
|
|
|
typedef const RECTL *LPCRECTL;
|
|
|
|
typedef struct tagPOINT {
|
|
|
|
LONG x;
|
|
|
|
LONG y;
|
|
|
|
} POINT,POINTL,*PPOINT,*LPPOINT,*PPOINTL,*LPPOINTL;
|
|
|
|
typedef struct tagSIZE {
|
|
|
|
LONG cx;
|
|
|
|
LONG cy;
|
|
|
|
} SIZE,SIZEL,*PSIZE,*LPSIZE,*PSIZEL,*LPSIZEL;
|
|
|
|
typedef struct tagPOINTS {
|
|
|
|
SHORT x;
|
|
|
|
SHORT y;
|
|
|
|
} POINTS,*PPOINTS,*LPPOINTS;
|
|
|
|
|
2009-06-17 11:18:51 +00:00
|
|
|
#ifdef _MSC_VER
|
|
|
|
#pragma warning(pop)
|
|
|
|
#endif
|
|
|
|
|
2005-05-08 17:44:37 +00:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
#endif
|