!INCLUDE $(NTMAKEENV)\makefile.plt COPYRIGHT_STRING = Copyright (c) 1990-1999 Microsoft Corporation SDKINC = $(_NTROOT)\public\sdk\inc OAKINC = $(_NTROOT)\public\oak\inc DDKINC = $(_NTROOT)\public\ddk\inc !IFNDEF NTOSINC NTOSINC = $(_NTROOT)\private\ntos\inc !ENDIF PRVINC = $(_NTROOT)\private\inc TARGETINCS=$(_NTROOT)\public\sdk\inc\windbgkd.h NTDDK_DEPENDS = $(NTOSINC)\ntosdef.h \ $(SDKINC)\ntseapi.h \ $(SDKINC)\ntkeapi.h \ $(SDKINC)\ntrtl.h \ $(SDKINC)\devioctl.h \ $(SDKINC)\ntioapi.h \ $(SDKINC)\ntlpcapi.h \ $(SDKINC)\ntregapi.h \ $(SDKINC)\ntobapi.h \ $(SDKINC)\ntmmapi.h \ $(SDKINC)\ntpsapi.h NTDDK_DEPENDS1= $(NTOSINC)\i386.h \ $(SDKINC)\nti386.h \ $(SDKINC)\ntexapi.h \ $(SDKINC)\ntconfig.h \ $(SDKINC)\ntxcapi.h \ $(NTOSINC)\ke.h \ $(NTOSINC)\kd.h \ $(NTOSINC)\ex.h \ $(NTOSINC)\exboosts.h \ $(NTOSINC)\mm.h \ $(NTOSINC)\ps.h \ $(NTOSINC)\io.h \ $(NTOSINC)\hal.h \ $(NTOSINC)\ob.h \ $(NTOSINC)\pci.h WINDBGKD_DEPENDS = $(SDKINC)\ntdef.h \ $(SDKINC)\nti386.h \ $(NTOSINC)\i386.h \ $(SDKINC)\ntdbg.h NTMINIPORT_DEPENDS = \ $(SDKINC)\ntdef.h \ $(SDKINC)\nti386.h \ $(SDKINC)\ntioapi.h \ $(SDKINC)\ntrtl.h \ $(NTOSINC)\ke.h \ $(NTOSINC)\v86emul.h \ $(NTOSINC)\pci.h \ $(NTOSINC)\mm.h \ $(NTOSINC)\io.h \ $(SDKINC)\ntconfig.h TARGETNTDDK = $(DDKINC)\ntddk.h TARGETNTMINIPORT = inc\miniport.h all: ntincs !IF "$(BUILDMSG)" != "" echo $(BUILDMSG) !ENDIF ntincs: $(TARGETNTDDK) $(TARGETINCS) $(TARGETNTMINIPORT) \ keheaders clean: cleanlib cleaninc all cleanlib: -erase obj\$(TARGET_DIRECTORY)\*.lib -erase mpobj\$(TARGET_DIRECTORY)\*.lib -erase $(_NTROOT)\public\sdk\lib\$(TARGET_DIRECTORY)\ntoskrnl.* -erase init\up\obj\$(TARGET_DIRECTORY)\ntoskrnl.def -erase init\mp\obj\$(TARGET_DIRECTORY)\ntoskrnl.def cleaninc: -erase $(TARGETNTDDK) -erase $(TARGETINCS) -erase $(TARGETNTMINIPORT) $(TARGETNTDDK): $(NTDDK_DEPENDS) $(NTDDK_DEPENDS1) makefil0 type << > $(TARGETNTDDK) /*++ BUILD Version: ???? // Increment this if a change has global effects $(COPYRIGHT_STRING) Module Name: ntddk.h Abstract: This module defines the NT types, constants, and functions that are exposed to device drivers. Revision History: --*/ #ifndef _NTDDK_ #define _NTDDK_ #define NT_INCLUDED #define _CTYPE_DISABLE_MACROS #include #include #include #include #include << type << >> $(TARGETNTDDK) #ifdef __cplusplus extern "C" { // extern "C" #endif // // Define types that are not exported. // typedef struct _KTHREAD *PKTHREAD; typedef struct _ETHREAD *PETHREAD; typedef struct _EPROCESS *PEPROCESS; typedef struct _PEB *PPEB; typedef struct _KINTERRUPT *PKINTERRUPT; typedef struct _IO_TIMER *PIO_TIMER; typedef struct _OBJECT_TYPE *POBJECT_TYPE; typedef struct _CALLBACK_OBJECT *PCALLBACK_OBJECT; typedef struct _DEVICE_HANDLER_OBJECT *PDEVICE_HANDLER_OBJECT; typedef struct _BUS_HANDLER *PBUS_HANDLER; #if defined(_M_ALPHA) void *__rdthread(void); #pragma intrinsic(__rdthread) unsigned char __swpirql(unsigned char); #pragma intrinsic(__swpirql) void *__rdpcr(void); #pragma intrinsic(__rdpcr) #define PCR ((PKPCR)__rdpcr()) #define KeGetCurrentThread() ((struct _KTHREAD *) __rdthread()) #endif // defined(_M_ALPHA) #if defined(_M_IX86) PKTHREAD NTAPI KeGetCurrentThread(); #endif // defined(_M_IX86) #if defined(_M_IA64) // // Define Address of Processor Control Registers. // #define KIPCR ((ULONG_PTR)(KADDRESS_BASE + 0xffff0000)) // kernel address of first PCR // // Define Pointer to Processor Control Registers. // #define PCR ((volatile KPCR * const)KIPCR) PKTHREAD NTAPI KeGetCurrentThread(); #endif // defined(_M_IA64) #define PsGetCurrentProcess() IoGetCurrentProcess() #define PsGetCurrentThread() ((PETHREAD) (KeGetCurrentThread())) extern PCCHAR KeNumberProcessors; #ifndef FAR #define FAR #endif << hextract -o $(TARGETNTDDK) -lt ntddk -bt begin_ntddk end_ntddk $(NTDDK_DEPENDS) hextract -o $(TARGETNTDDK) -lt ntddk -bt begin_ntddk end_ntddk $(NTDDK_DEPENDS1) type << >> $(TARGETNTDDK) #ifdef POOL_TAGGING #define ExAllocatePool(a,b) ExAllocatePoolWithTag(a,b,' kdD') #define ExAllocatePoolWithQuota(a,b) ExAllocatePoolWithQuotaTag(a,b,' kdD') #endif extern POBJECT_TYPE *IoFileObjectType; extern POBJECT_TYPE *ExEventObjectType; extern POBJECT_TYPE *ExSemaphoreObjectType; // // Define exported ZwXxx routines to device drivers. // NTSYSAPI NTSTATUS NTAPI ZwCreateFile( OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PLARGE_INTEGER AllocationSize OPTIONAL, IN ULONG FileAttributes, IN ULONG ShareAccess, IN ULONG CreateDisposition, IN ULONG CreateOptions, IN PVOID EaBuffer OPTIONAL, IN ULONG EaLength ); NTSYSAPI NTSTATUS NTAPI ZwOpenFile( OUT PHANDLE FileHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, OUT PIO_STATUS_BLOCK IoStatusBlock, IN ULONG ShareAccess, IN ULONG OpenOptions ); NTSYSAPI NTSTATUS NTAPI ZwQueryInformationFile( IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID FileInformation, IN ULONG Length, IN FILE_INFORMATION_CLASS FileInformationClass ); NTSYSAPI NTSTATUS NTAPI ZwSetInformationFile( IN HANDLE FileHandle, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PVOID FileInformation, IN ULONG Length, IN FILE_INFORMATION_CLASS FileInformationClass ); NTSYSAPI NTSTATUS NTAPI ZwReadFile( IN HANDLE FileHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, OUT PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER ByteOffset OPTIONAL, IN PULONG Key OPTIONAL ); NTSYSAPI NTSTATUS NTAPI ZwWriteFile( IN HANDLE FileHandle, IN HANDLE Event OPTIONAL, IN PIO_APC_ROUTINE ApcRoutine OPTIONAL, IN PVOID ApcContext OPTIONAL, OUT PIO_STATUS_BLOCK IoStatusBlock, IN PVOID Buffer, IN ULONG Length, IN PLARGE_INTEGER ByteOffset OPTIONAL, IN PULONG Key OPTIONAL ); NTSYSAPI NTSTATUS NTAPI ZwClose( IN HANDLE Handle ); NTSYSAPI NTSTATUS NTAPI ZwCreateDirectoryObject( OUT PHANDLE DirectoryHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes ); NTSYSAPI NTSTATUS NTAPI ZwMakeTemporaryObject( IN HANDLE Handle ); NTSYSAPI NTSTATUS NTAPI ZwOpenSection( OUT PHANDLE SectionHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes ); NTSYSAPI NTSTATUS NTAPI ZwMapViewOfSection( IN HANDLE SectionHandle, IN HANDLE ProcessHandle, IN OUT PVOID *BaseAddress, IN ULONG ZeroBits, IN ULONG CommitSize, IN OUT PLARGE_INTEGER SectionOffset OPTIONAL, IN OUT PSIZE_T ViewSize, IN SECTION_INHERIT InheritDisposition, IN ULONG AllocationType, IN ULONG Protect ); NTSYSAPI NTSTATUS NTAPI ZwUnmapViewOfSection( IN HANDLE ProcessHandle, IN PVOID BaseAddress ); NTSYSAPI NTSTATUS NTAPI ZwSetInformationThread( IN HANDLE ThreadHandle, IN THREADINFOCLASS ThreadInformationClass, IN PVOID ThreadInformation, IN ULONG ThreadInformationLength ); NTSYSAPI NTSTATUS NTAPI ZwCreateKey( OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes, IN ULONG TitleIndex, IN PUNICODE_STRING Class OPTIONAL, IN ULONG CreateOptions, OUT PULONG Disposition OPTIONAL ); NTSYSAPI NTSTATUS NTAPI ZwOpenKey( OUT PHANDLE KeyHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes ); NTSYSAPI NTSTATUS NTAPI ZwDeleteKey( IN HANDLE KeyHandle ); NTSYSAPI NTSTATUS NTAPI ZwEnumerateKey( IN HANDLE KeyHandle, IN ULONG Index, IN KEY_INFORMATION_CLASS KeyInformationClass, OUT PVOID KeyInformation, IN ULONG Length, OUT PULONG ResultLength ); NTSYSAPI NTSTATUS NTAPI ZwEnumerateValueKey( IN HANDLE KeyHandle, IN ULONG Index, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, OUT PVOID KeyValueInformation, IN ULONG Length, OUT PULONG ResultLength ); NTSYSAPI NTSTATUS NTAPI ZwFlushKey( IN HANDLE KeyHandle ); NTSYSAPI NTSTATUS NTAPI ZwQueryKey( IN HANDLE KeyHandle, IN KEY_INFORMATION_CLASS KeyInformationClass, OUT PVOID KeyInformation, IN ULONG Length, OUT PULONG ResultLength ); NTSYSAPI NTSTATUS NTAPI ZwQueryValueKey( IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN KEY_VALUE_INFORMATION_CLASS KeyValueInformationClass, OUT PVOID KeyValueInformation, IN ULONG Length, OUT PULONG ResultLength ); NTSYSAPI NTSTATUS NTAPI ZwSetValueKey( IN HANDLE KeyHandle, IN PUNICODE_STRING ValueName, IN ULONG TitleIndex OPTIONAL, IN ULONG Type, IN PVOID Data, IN ULONG DataSize ); NTSYSAPI NTSTATUS NTAPI ZwOpenSymbolicLinkObject( OUT PHANDLE LinkHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes ); NTSYSAPI NTSTATUS NTAPI ZwQuerySymbolicLinkObject( IN HANDLE LinkHandle, IN OUT PUNICODE_STRING LinkTarget, OUT PULONG ReturnedLength OPTIONAL ); NTSTATUS ZwCreateTimer ( OUT PHANDLE TimerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes OPTIONAL, IN TIMER_TYPE TimerType ); NTSTATUS ZwOpenTimer ( OUT PHANDLE TimerHandle, IN ACCESS_MASK DesiredAccess, IN POBJECT_ATTRIBUTES ObjectAttributes ); NTSTATUS ZwCancelTimer ( IN HANDLE TimerHandle, OUT PBOOLEAN CurrentState OPTIONAL ); NTSTATUS ZwSetTimer ( IN HANDLE TimerHandle, IN PLARGE_INTEGER DueTime, IN PTIMER_APC_ROUTINE TimerApcRoutine OPTIONAL, IN PVOID TimerContext OPTIONAL, IN BOOLEAN WakeTimer, IN LONG Period OPTIONAL, OUT PBOOLEAN PreviousState OPTIONAL ); #ifdef __cplusplus } // extern "C" #endif #endif // _NTDDK_ << -attrib -a $(TARGETNTDDK) $(SDKINC)\windbgkd.h: $(WINDBGKD_DEPENDS) makefil0 type << > $(SDKINC)\windbgkd.h /*++ BUILD Version: ???? // Increment this if a change has global effects $(COPYRIGHT_STRING) Module Name: windbgkd.h Abstract: This module defines the 32-Bit Windows Kernel Debugger interface. Revision History: --*/ #ifndef _WINDBGKD_ #define _WINDBGKD_ << hextract -o $(SDKINC)\windbgkd.h -lt windbgkd -bt begin_windbgkd end_windbgkd $(WINDBGKD_DEPENDS) type << >> $(SDKINC)\windbgkd.h #endif // _WINDBGKD_ << -attrib -a $(SDKINC)\windbgkd.h inc\miniport.h: $(NTMINIPORT_DEPENDS) makefil0 type << > inc\miniport.h /*++ Copyright (c) 1989-1997 Microsoft Corporation Module Name: miniport.h Abstract: Type definitions for miniport drivers. Revision History: --*/ #ifndef _MINIPORT_ #define _MINIPORT_ #include "stddef.h" #define ASSERT( exp ) #ifndef FAR #define FAR #endif << hextract -o inc\miniport.h -lt ntminiport -bt begin_ntminiport end_ntminiport $(NTMINIPORT_DEPENDS) type << >> inc\miniport.h #endif /* _MINIPORT_ */ << -attrib -a inc\miniport.h -copy inc\miniport.h $(DDKINC) keheaders: cd ke\up build -OZ nmake -l genxx BUILDMSG= cd ..\..