mirror of
https://github.com/reactos/reactos.git
synced 2025-04-04 04:26:32 +00:00
Fix some NDK things and missing w32api defines.
svn path=/trunk/; revision=16234
This commit is contained in:
parent
65fd7f2386
commit
3e1728b45b
14 changed files with 200 additions and 131 deletions
|
@ -10,7 +10,6 @@
|
|||
#define _HALTYPES_H
|
||||
|
||||
/* DEPENDENCIES **************************************************************/
|
||||
//#include <ddk/ntdddisk.h>
|
||||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
extern ULONG NTOSAPI KdComPortInUse;
|
||||
|
@ -30,6 +29,7 @@ extern ULONG NTOSAPI KdComPortInUse;
|
|||
#define MB_FLAGS_BOOT_LOADER_NAME (0x200)
|
||||
#define MB_FLAGS_APM_TABLE (0x400)
|
||||
#define MB_FLAGS_GRAPHICS_TABLE (0x800)
|
||||
#define MB_FLAGS_ACPI_TABLE (0x1000)
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
typedef enum _FIRMWARE_ENTRY
|
||||
|
@ -44,6 +44,19 @@ typedef enum _FIRMWARE_ENTRY
|
|||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
typedef struct _HAL_PRIVATE_DISPATCH
|
||||
{
|
||||
ULONG Version;
|
||||
} HAL_PRIVATE_DISPATCH, *PHAL_PRIVATE_DISPATCH;
|
||||
|
||||
#ifdef __NTOSKRNL__
|
||||
extern NTOSAPI HAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
|
||||
#else
|
||||
extern NTOSAPI PHAL_PRIVATE_DISPATCH HalPrivateDispatchTable;
|
||||
#endif
|
||||
|
||||
#define HAL_PRIVATE_DISPATCH_VERSION 1
|
||||
|
||||
typedef struct _LOADER_MODULE
|
||||
{
|
||||
ULONG ModStart;
|
||||
|
|
|
@ -20,6 +20,11 @@ extern POBJECT_TYPE NTOSAPI IoDriverObjectType;
|
|||
extern POBJECT_TYPE NTOSAPI IoFileObjectType;
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
#define DOE_UNLOAD_PENDING 0x1
|
||||
#define DOE_DELETE_PENDING 0x2
|
||||
#define DOE_REMOVE_PENDING 0x4
|
||||
#define DOE_REMOVE_PROCESSED 0x8
|
||||
#define DOE_START_PENDING 0x10
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
|
|
|
@ -277,5 +277,9 @@ STDCALL
|
|||
KeRaiseUserException(
|
||||
IN NTSTATUS ExceptionCode
|
||||
);
|
||||
|
||||
VOID
|
||||
STDCALL
|
||||
KeFlushWriteBuffer(VOID);
|
||||
|
||||
#endif
|
||||
|
|
|
@ -16,6 +16,8 @@
|
|||
/* CONSTANTS *****************************************************************/
|
||||
#define LPC_MESSAGE_BASE_SIZE 24
|
||||
#define MAX_MESSAGE_DATA (0x130)
|
||||
#define PORT_MAX_DATA_LENGTH 0x104
|
||||
#define PORT_MAX_MESSAGE_LENGTH 0x148
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
|
|
|
@ -16,6 +16,17 @@
|
|||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
typedef enum _PP_NPAGED_LOOKASIDE_NUMBER
|
||||
{
|
||||
LookasideSmallIrpList = 0,
|
||||
LookasideLargeIrpList = 1,
|
||||
LookasideMdlList = 2,
|
||||
LookasideCreateInfoList = 3,
|
||||
LookasideNameBufferList = 4,
|
||||
LookasideTwilightList = 5,
|
||||
LookasideCompletionList = 6,
|
||||
LookasideMaximumList = 7
|
||||
} PP_NPAGED_LOOKASIDE_NUMBER;
|
||||
|
||||
/* TYPES *********************************************************************/
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
/* EXPORTED DATA *************************************************************/
|
||||
extern NTOSAPI POBJECT_TYPE ObDirectoryType;
|
||||
extern NTOSAPI struct DEVICE_MAP* ObSystemDeviceMap;
|
||||
extern NTOSAPI PDEVICE_MAP ObSystemDeviceMap;
|
||||
|
||||
/* CONSTANTS *****************************************************************/
|
||||
|
||||
|
|
|
@ -387,6 +387,11 @@ typedef struct _RTL_ATOM_TABLE
|
|||
AclRevisionInformation = 1,
|
||||
AclSizeInformation
|
||||
} ACL_INFORMATION_CLASS;
|
||||
|
||||
#define TIME_ZONE_ID_UNKNOWN 0
|
||||
#define TIME_ZONE_ID_STANDARD 1
|
||||
#define TIME_ZONE_ID_DAYLIGHT 2
|
||||
#define TIME_ZONE_ID_INVALID 0xFFFFFFFF
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
@ -292,78 +292,6 @@ RemoveTailList(
|
|||
|
||||
#define IsLastEntry(ListHead, Entry) \
|
||||
((ListHead)->Blink == Entry)
|
||||
|
||||
#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
/*
|
||||
* Constant String Macro
|
||||
|
|
|
@ -952,6 +952,15 @@ ZwGetContextThread(
|
|||
OUT PCONTEXT Context
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtGetPlugPlayEvent(
|
||||
ULONG Reserved1,
|
||||
ULONG Reserved2,
|
||||
struct _PLUGPLAY_EVENT_BLOCK *Buffer,
|
||||
ULONG BufferSize
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtImpersonateClientOfPort(
|
||||
|
@ -1497,6 +1506,14 @@ ZwOpenTimer(
|
|||
IN POBJECT_ATTRIBUTES ObjectAttributes
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtPlugPlayControl(
|
||||
ULONG ControlCode,
|
||||
PVOID Buffer,
|
||||
ULONG BufferSize
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtPowerInformation(
|
||||
|
@ -2049,7 +2066,7 @@ NTSTATUS
|
|||
STDCALL
|
||||
NtQuerySystemEnvironmentValue(
|
||||
IN PUNICODE_STRING Name,
|
||||
OUT PVOID Value,
|
||||
OUT PWSTR Value,
|
||||
ULONG Length,
|
||||
PULONG ReturnLength
|
||||
);
|
||||
|
@ -3307,23 +3324,6 @@ ZwYieldExecution(
|
|||
VOID
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtPlugPlayControl(
|
||||
DWORD Unknown1,
|
||||
DWORD Unknown2,
|
||||
DWORD Unknown3
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtGetPlugPlayEvent(
|
||||
ULONG Reserved1,
|
||||
ULONG Reserved2,
|
||||
PVOID Buffer,
|
||||
ULONG BufferLength
|
||||
);
|
||||
|
||||
NTSTATUS
|
||||
STDCALL
|
||||
NtSetSystemPowerState(
|
||||
|
@ -3608,7 +3608,7 @@ NTSTATUS
|
|||
STDCALL
|
||||
NtQuerySection(
|
||||
IN HANDLE SectionHandle,
|
||||
IN CINT SectionInformationClass,
|
||||
IN SECTION_INFORMATION_CLASS SectionInformationClass,
|
||||
OUT PVOID SectionInformation,
|
||||
IN ULONG Length,
|
||||
OUT PULONG ResultLength
|
||||
|
|
|
@ -25,6 +25,9 @@
|
|||
|
||||
#define EVENT_PAIR_ALL_ACCESS (0x1F0000L)
|
||||
|
||||
#define OBJECT_TYPE_CREATE 0x0001
|
||||
#define OBJECT_TYPE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | 0x1)
|
||||
|
||||
/* For ProcessDeviceMap */
|
||||
#define DOSDEVICE_DRIVE_UNKNOWN 0
|
||||
#define DOSDEVICE_DRIVE_CALCULATE 1
|
||||
|
@ -36,7 +39,6 @@
|
|||
|
||||
/* ENUMERATIONS **************************************************************/
|
||||
|
||||
|
||||
typedef enum _HARDERROR_RESPONSE_OPTION
|
||||
{
|
||||
OptionAbortRetryIgnore,
|
||||
|
@ -250,6 +252,7 @@ typedef enum _IO_COMPLETION_INFORMATION_CLASS
|
|||
|
||||
typedef unsigned short LANGID;
|
||||
typedef LANGID *PLANGID;
|
||||
struct _PLUGPLAY_EVENT_BLOCK; /* FIXME: Ask Filip if it's OK to define it */
|
||||
|
||||
/**** Information Structures ****/
|
||||
/*
|
||||
|
|
|
@ -71,24 +71,6 @@ typedef enum _PLUGPLAY_EVENT_CATEGORY {
|
|||
MaxPlugEventCategory
|
||||
} PLUGPLAY_EVENT_CATEGORY;
|
||||
|
||||
#ifndef __USE_W32API
|
||||
typedef enum _PNP_VETO_TYPE {
|
||||
PNP_VetoTypeUnknown,
|
||||
PNP_VetoLegacyDevice,
|
||||
PNP_VetoPendingClose,
|
||||
PNP_VetoWindowsApp,
|
||||
PNP_VetoWindowsService,
|
||||
PNP_VetoOutstandingOpen,
|
||||
PNP_VetoDevice,
|
||||
PNP_VetoDriver,
|
||||
PNP_VetoIllegalDeviceRequest,
|
||||
PNP_VetoInsufficientPower,
|
||||
PNP_VetoNonDisableable,
|
||||
PNP_VetoLegacyDriver,
|
||||
PNP_VetoInsufficientRights,
|
||||
} PNP_VETO_TYPE;
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Plug and Play event structure used by NtGetPlugPlayEvent.
|
||||
*
|
||||
|
@ -184,14 +166,13 @@ typedef struct _PLUGPLAY_EVENT_BLOCK {
|
|||
*
|
||||
* Remarks
|
||||
* This function isn't multi-thread safe!
|
||||
*/
|
||||
|
||||
NTSTATUS STDCALL
|
||||
NtGetPlugPlayEvent(
|
||||
ULONG Reserved1,
|
||||
ULONG Reserved2,
|
||||
PPLUGPLAY_EVENT_BLOCK Buffer,
|
||||
ULONG BufferSize);
|
||||
*/
|
||||
|
||||
/*
|
||||
* NtPlugPlayControl
|
||||
|
@ -294,13 +275,6 @@ typedef struct _PLUGPLAY_DEVICE_STATUS_DATA
|
|||
ULONG Flags; /* DN_ see cfg.h */
|
||||
} PLUGPLAY_DEVICE_STATUS_DATA, *PPLUGPLAY_DEVICE_STATUS_DATA;
|
||||
|
||||
|
||||
NTSTATUS STDCALL
|
||||
NtPlugPlayControl(
|
||||
ULONG ControlCode,
|
||||
PVOID Buffer,
|
||||
ULONG BufferSize);
|
||||
|
||||
#endif /* __GUIDS_ONLY__ */
|
||||
|
||||
#endif /* __NTPNP_H */
|
||||
|
|
|
@ -41,4 +41,77 @@
|
|||
#define SECONDS_TO_100NS(seconds) (((LONGLONG)(seconds)) * MILLIS_TO_100NS(1000))
|
||||
#define MINUTES_TO_100NS(minutes) (((LONGLONG)(minutes)) * SECONDS_TO_100NS(60))
|
||||
#define HOURS_TO_100NS(hours) (((LONGLONG)(hours)) * MINUTES_TO_100NS(60))
|
||||
#define TYPE_ALIGNMENT(t) FIELD_OFFSET(struct { char x; t test; }, test)
|
||||
#define InsertAscendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
#define InsertDescendingListFIFO(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
#define InsertAscendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField >=\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
#define InsertDescendingList(ListHead, Type, ListEntryField, NewEntry, SortField)\
|
||||
{\
|
||||
PLIST_ENTRY current;\
|
||||
\
|
||||
current = (ListHead)->Flink;\
|
||||
while (current != (ListHead))\
|
||||
{\
|
||||
if (CONTAINING_RECORD(current, Type, ListEntryField)->SortField <=\
|
||||
(NewEntry)->SortField)\
|
||||
{\
|
||||
break;\
|
||||
}\
|
||||
current = current->Flink;\
|
||||
}\
|
||||
\
|
||||
InsertTailList(current, &((NewEntry)->ListEntryField));\
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
#endif
|
||||
|
||||
#include "ntddk.h"
|
||||
#include "ntapi.h"
|
||||
//#include "ntapi.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
@ -329,9 +329,6 @@ extern LARGE_INTEGER IoOtherTransferCount;
|
|||
#define PIN_NO_READ (4)
|
||||
#define PIN_IF_BCB (8)
|
||||
|
||||
#define PORT_CONNECT 0x0001
|
||||
#define PORT_ALL_ACCESS (STANDARD_RIGHTS_ALL |\
|
||||
PORT_CONNECT)
|
||||
/* also in winnt.h */
|
||||
#define SEC_BASED 0x00200000
|
||||
#define SEC_NO_CHANGE 0x00400000
|
||||
|
@ -539,6 +536,12 @@ typedef struct _SHARED_CACHE_MAP *PSHARED_CACHE_MAP;
|
|||
typedef struct _VACB *PVACB;
|
||||
typedef struct _VAD_HEADER *PVAD_HEADER;
|
||||
|
||||
typedef ULONG LBN;
|
||||
typedef LBN *PLBN;
|
||||
|
||||
typedef ULONG VBN;
|
||||
typedef VBN *PVBN;
|
||||
|
||||
typedef struct _NOTIFY_SYNC
|
||||
{
|
||||
ULONG Unknown0;
|
||||
|
@ -1239,6 +1242,28 @@ typedef struct _FSRTL_PER_STREAM_CONTEXT {
|
|||
|
||||
#endif /* (VER_PRODUCTBUILD >= 2600) */
|
||||
|
||||
typedef struct _BASE_MCB
|
||||
{
|
||||
ULONG MaximumPairCount;
|
||||
ULONG PairCount;
|
||||
POOL_TYPE PoolType;
|
||||
PVOID Mapping;
|
||||
} BASE_MCB;
|
||||
typedef BASE_MCB *PBASE_MCB;
|
||||
|
||||
typedef struct _LARGE_MCB
|
||||
{
|
||||
PFAST_MUTEX FastMutex;
|
||||
BASE_MCB BaseMcb;
|
||||
} LARGE_MCB;
|
||||
typedef LARGE_MCB *PLARGE_MCB;
|
||||
|
||||
typedef struct _MCB
|
||||
{
|
||||
LARGE_MCB DummyFieldThatSizesThisStructureCorrectly;
|
||||
} MCB;
|
||||
typedef MCB *PMCB;
|
||||
|
||||
typedef struct _GENERATE_NAME_CONTEXT {
|
||||
USHORT Checksum;
|
||||
BOOLEAN CheckSumInserted;
|
||||
|
@ -2556,6 +2581,15 @@ FsRtlIsNtstatusExpected (
|
|||
IN NTSTATUS Ntstatus
|
||||
);
|
||||
|
||||
#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
|
||||
#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
|
||||
#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
|
||||
#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
|
||||
|
||||
extern BOOLEAN NlsMbCodePageTag;
|
||||
extern BOOLEAN NlsMbOemCodePageTag;
|
||||
extern PUSHORT NlsOemLeadByteInfo;
|
||||
|
||||
#define FsRtlIsLeadDbcsCharacter(DBCS_CHAR) ( \
|
||||
(BOOLEAN)((UCHAR)(DBCS_CHAR) < 0x80 ? FALSE : \
|
||||
(NLS_MB_CODE_PAGE_TAG && \
|
||||
|
|
|
@ -5368,12 +5368,29 @@ RtlQueryRegistryValues(
|
|||
IN PVOID Context,
|
||||
IN PVOID Environment OPTIONAL);
|
||||
|
||||
NTOSAPI
|
||||
VOID
|
||||
DDKAPI
|
||||
RtlRetrieveUlong(
|
||||
IN OUT PULONG DestinationAddress,
|
||||
IN PULONG SourceAddress);
|
||||
|
||||
#define LONG_SIZE (sizeof(LONG))
|
||||
#define LONG_MASK (LONG_SIZE - 1)
|
||||
|
||||
/*
|
||||
* VOID
|
||||
* RtlRetrieveUlong (
|
||||
* PULONG DestinationAddress,
|
||||
* PULONG SourceAddress
|
||||
* );
|
||||
*/
|
||||
#define RtlRetrieveUlong(DestAddress,SrcAddress) \
|
||||
if ((ULONG_PTR)(SrcAddress) & LONG_MASK) \
|
||||
{ \
|
||||
((PUCHAR)(DestAddress))[0]=((PUCHAR)(SrcAddress))[0]; \
|
||||
((PUCHAR)(DestAddress))[1]=((PUCHAR)(SrcAddress))[1]; \
|
||||
((PUCHAR)(DestAddress))[2]=((PUCHAR)(SrcAddress))[2]; \
|
||||
((PUCHAR)(DestAddress))[3]=((PUCHAR)(SrcAddress))[3]; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
*((PULONG)(DestAddress))=*((PULONG)(SrcAddress)); \
|
||||
}
|
||||
|
||||
NTOSAPI
|
||||
VOID
|
||||
|
|
Loading…
Reference in a new issue