149 lines
3.5 KiB
C
149 lines
3.5 KiB
C
//+-------------------------------------------------------------------------
|
|
//
|
|
// Microsoft Windows
|
|
//
|
|
// Copyright (C) Microsoft Corporation, 1999 - 1999
|
|
//
|
|
// File: newtypes.h
|
|
//
|
|
//--------------------------------------------------------------------------
|
|
|
|
#if !defined(__midl) && defined(_X86_) && _MSC_VER >= 1300
|
|
#define _W64 __w64
|
|
#else
|
|
#define _W64
|
|
#endif
|
|
|
|
//
|
|
// The INT_PTR is guaranteed to be the same size as a pointer. Its
|
|
// size with change with pointer size (32/64). It should be used
|
|
// anywhere that a pointer is cast to an integer type. UINT_PTR is
|
|
// the unsigned variation.
|
|
//
|
|
// __int3264 is intrinsic to 64b MIDL but not to old MIDL or to C compiler.
|
|
//
|
|
#if ( 501 < __midl )
|
|
|
|
// typedef [public] __int3264 INT_PTR, *PINT_PTR;
|
|
// typedef [public] unsigned __int3264 UINT_PTR, *PUINT_PTR;
|
|
|
|
typedef [public] __int3264 LONG_PTR, *PLONG_PTR;
|
|
typedef [public] unsigned __int3264 ULONG_PTR, *PULONG_PTR;
|
|
|
|
#else // midl64
|
|
// old midl and C++ compiler
|
|
|
|
#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;
|
|
|
|
#define __int3264 __int64
|
|
|
|
#else
|
|
// typedef _W64 int INT_PTR, *PINT_PTR;
|
|
// typedef _W64 unsigned int UINT_PTR, *PUINT_PTR;
|
|
|
|
typedef _W64 long LONG_PTR, *PLONG_PTR;
|
|
typedef _W64 unsigned long ULONG_PTR, *PULONG_PTR;
|
|
|
|
#define __int3264 __int32
|
|
|
|
#endif
|
|
#endif // midl64
|
|
|
|
//
|
|
// Unicode strings are counted 16-bit character strings. If they are
|
|
// NULL terminated, Length does not include trailing NULL.
|
|
//
|
|
|
|
typedef struct _UNICODE_STRING {
|
|
USHORT Length;
|
|
USHORT MaximumLength;
|
|
#ifdef MIDL_PASS
|
|
[size_is(MaximumLength / 2), length_is((Length) / 2) ] USHORT * Buffer;
|
|
#else // MIDL_PASS
|
|
PWSTR Buffer;
|
|
#endif // MIDL_PASS
|
|
} UNICODE_STRING;
|
|
|
|
typedef UNICODE_STRING *PUNICODE_STRING;
|
|
typedef const UNICODE_STRING *PCUNICODE_STRING;
|
|
#define UNICODE_NULL ((WCHAR)0) // winnt
|
|
|
|
|
|
#ifdef VC_DEV
|
|
|
|
typedef struct LIST_ENTRY32 {
|
|
ULONG Flink;
|
|
ULONG Blink;
|
|
} LIST_ENTRY32;
|
|
typedef LIST_ENTRY32 *PLIST_ENTRY32;
|
|
|
|
typedef struct LIST_ENTRY64 {
|
|
ULONGLONG Flink;
|
|
ULONGLONG Blink;
|
|
} LIST_ENTRY64;
|
|
typedef LIST_ENTRY64 *PLIST_ENTRY64;
|
|
|
|
#endif
|
|
|
|
typedef struct _STRING32 {
|
|
USHORT Length;
|
|
USHORT MaximumLength;
|
|
ULONG Buffer;
|
|
} STRING32;
|
|
typedef STRING32 *PSTRING32;
|
|
|
|
typedef STRING32 UNICODE_STRING32;
|
|
typedef UNICODE_STRING32 *PUNICODE_STRING32;
|
|
|
|
|
|
|
|
typedef struct _STRING64 {
|
|
USHORT Length;
|
|
USHORT MaximumLength;
|
|
ULONGLONG Buffer;
|
|
} STRING64;
|
|
typedef STRING64 *PSTRING64;
|
|
|
|
typedef STRING64 UNICODE_STRING64;
|
|
typedef UNICODE_STRING64 *PUNICODE_STRING64;
|
|
|
|
typedef STRING64 ANSI_STRING64;
|
|
typedef ANSI_STRING64 *PANSI_STRING64;
|
|
|
|
// begin_winnt begin_ntndis
|
|
|
|
#if (_MSC_VER >= 800) || defined(_STDCALL_SUPPORTED)
|
|
#define NTAPI __stdcall
|
|
#else
|
|
#define _cdecl
|
|
#define NTAPI
|
|
#endif
|
|
|
|
typedef LONG NTSTATUS;
|
|
/*lint -e624 */ // Don't complain about different typedefs. // winnt
|
|
typedef NTSTATUS *PNTSTATUS;
|
|
/*lint +e624 */ // Resume checking for different typedefs. // winnt
|
|
|
|
// begin_ntndis
|
|
//
|
|
// Counted String
|
|
//
|
|
|
|
typedef struct _STRING {
|
|
USHORT Length;
|
|
USHORT MaximumLength;
|
|
#ifdef MIDL_PASS
|
|
[size_is(MaximumLength), length_is(Length) ]
|
|
#endif // MIDL_PASS
|
|
PCHAR Buffer;
|
|
} STRING;
|
|
typedef STRING *PSTRING;
|
|
|
|
typedef STRING ANSI_STRING;
|
|
typedef PSTRING PANSI_STRING;
|