#define DDKFASTAPI __fastcall
#define DDKCDECLAPI __cdecl
+/* FIXME: REMOVE THIS UNCOMPATIBLE CRUFT!!! */
#if defined(_NTOSKRNL_)
#ifndef NTOSAPI
#define NTOSAPI DECL_EXPORT
# define _DDK_DUMMYUNION_N_MEMBER(n, name) name
#endif
+#if !defined(_NTSYSTEM_)
+#define NTSYSAPI DECLSPEC_IMPORT
+#define NTSYSCALLAPI DECLSPEC_IMPORT
+#else
+#define NTSYSAPI
+#if defined(_NTDLLBUILD_)
+#define NTSYSCALLAPI
+#else
+#define NTSYSCALLAPI DECLSPEC_ADDRSAFE
+#endif
+#endif
+
/*
** Forward declarations
*/
struct _IO_STATUS_BLOCK;
struct _DEVICE_DESCRIPTION;
struct _SCATTER_GATHER_LIST;
+struct _DRIVE_LAYOUT_INFORMATION;
+struct _DRIVE_LAYOUT_INFORMATION_EX;
DECLARE_INTERNAL_OBJECT(ADAPTER_OBJECT)
DECLARE_INTERNAL_OBJECT(DMA_ADAPTER)
#define HalReferenceHandlerForBus HALDISPATCH->HalReferenceHandlerForBus
#define HalReferenceBusHandler HALDISPATCH->HalReferenceBusHandler
#define HalDereferenceBusHandler HALDISPATCH->HalDereferenceBusHandler
+#define HalInitPnpDriver HALDISPATCH->HalInitPnpDriver
+#define HalInitPowerManagement HALDISPATCH->HalInitPowerManagement
+#define HalGetDmaAdapter HALDISPATCH->HalGetDmaAdapter
+#define HalGetInterruptTranslator HALDISPATCH->HalGetInterruptTranslator
+#define HalStartMirroring HALDISPATCH->HalStartMirroring
+#define HalEndMirroring HALDISPATCH->HalEndMirroring
+#define HalMirrorPhysicalMemory HALDISPATCH->HalMirrorPhysicalMemory
+#define HalEndOfBoot HALDISPATCH->HalEndOfBoot
+#define HalMirrorVerify HALDISPATCH->HalMirrorVerify
typedef enum _FILE_INFORMATION_CLASS {
FileDirectoryInformation = 1,
LUID_AND_ATTRIBUTES Privilege[INITIAL_PRIVILEGE_COUNT];
} INITIAL_PRIVILEGE_SET, * PINITIAL_PRIVILEGE_SET;
+#define SE_MIN_WELL_KNOWN_PRIVILEGE 2
+#define SE_CREATE_TOKEN_PRIVILEGE 2
+#define SE_ASSIGNPRIMARYTOKEN_PRIVILEGE 3
+#define SE_LOCK_MEMORY_PRIVILEGE 4
+#define SE_INCREASE_QUOTA_PRIVILEGE 5
+#define SE_UNSOLICITED_INPUT_PRIVILEGE 6
+#define SE_MACHINE_ACCOUNT_PRIVILEGE 6
+#define SE_TCB_PRIVILEGE 7
+#define SE_SECURITY_PRIVILEGE 8
+#define SE_TAKE_OWNERSHIP_PRIVILEGE 9
+#define SE_LOAD_DRIVER_PRIVILEGE 10
+#define SE_SYSTEM_PROFILE_PRIVILEGE 11
+#define SE_SYSTEMTIME_PRIVILEGE 12
+#define SE_PROF_SINGLE_PROCESS_PRIVILEGE 13
+#define SE_INC_BASE_PRIORITY_PRIVILEGE 14
+#define SE_CREATE_PAGEFILE_PRIVILEGE 15
+#define SE_CREATE_PERMANENT_PRIVILEGE 16
+#define SE_BACKUP_PRIVILEGE 17
+#define SE_RESTORE_PRIVILEGE 18
+#define SE_SHUTDOWN_PRIVILEGE 19
+#define SE_DEBUG_PRIVILEGE 20
+#define SE_AUDIT_PRIVILEGE 21
+#define SE_SYSTEM_ENVIRONMENT_PRIVILEGE 22
+#define SE_CHANGE_NOTIFY_PRIVILEGE 23
+#define SE_REMOTE_SHUTDOWN_PRIVILEGE 24
+#define SE_UNDOCK_PRIVILEGE 25
+#define SE_SYNC_AGENT_PRIVILEGE 26
+#define SE_ENABLE_DELEGATION_PRIVILEGE 27
+#define SE_MANAGE_VOLUME_PRIVILEGE 28
+#define SE_IMPERSONATE_PRIVILEGE 29
+#define SE_CREATE_GLOBAL_PRIVILEGE 30
+#define SE_MAX_WELL_KNOWN_PRIVILEGE SE_CREATE_GLOBAL_PRIVILEGE
+
typedef struct _SECURITY_SUBJECT_CONTEXT {
PACCESS_TOKEN ClientToken;
SECURITY_IMPERSONATION_LEVEL ImpersonationLevel;
USHORT ShareAccess;
ULONG POINTER_ALIGNMENT EaLength;
} Create;
- /* FIXME: CreatePipe and CreateMailslot aren't defined in official
- * DDK/IFS headers. */
- struct {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT Reserved;
- USHORT ShareAccess;
- struct _NAMED_PIPE_CREATE_PARAMETERS *Parameters;
- } CreatePipe;
- struct {
- PIO_SECURITY_CONTEXT SecurityContext;
- ULONG Options;
- USHORT Reserved;
- USHORT ShareAccess;
- struct _MAILSLOT_CREATE_PARAMETERS *Parameters;
- } CreateMailslot;
struct {
ULONG Length;
ULONG POINTER_ALIGNMENT Key;
ProcessDebugObjectHandle,
ProcessDebugFlags,
ProcessHandleTracing,
- ProcessUnknown33,
- ProcessUnknown34,
- ProcessUnknown35,
- ProcessCookie,
MaxProcessInfoClass
} PROCESSINFOCLASS;
* IN PCHAR Field);
*/
#ifndef CONTAINING_RECORD
-#define CONTAINING_RECORD(Address, Type, Field) \
- ((Type *) (((ULONG_PTR) Address) - FIELD_OFFSET(Type, Field)))
+#define CONTAINING_RECORD(address, type, field) \
+ ((type *)(((ULONG_PTR)address) - (ULONG_PTR)(&(((type *)0)->field))))
#endif
/* LONG
BOOLEAN
DDKAPI
RtlValidRelativeSecurityDescriptor(
- IN PSECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
+ IN PISECURITY_DESCRIPTOR_RELATIVE SecurityDescriptorInput,
IN ULONG SecurityDescriptorLength,
IN SECURITY_INFORMATION RequiredInformation);
IN ...);
NTOSAPI
-NTSTATUS
+BOOLEAN
DDKAPI
DbgQueryDebugFilterState(
IN ULONG ComponentId,
IN ULONG Level,
IN BOOLEAN State);
-NTOSAPI
-BOOLEAN
-DDKAPI
-KeRosPrintAddress ( PVOID address );
-
-NTOSAPI
-VOID
-DDKAPI
-KeRosDumpStackFrames ( PULONG Frame, ULONG FrameCount );
-
#ifdef DBG
#define KdPrint(_x_) DbgPrint _x_