- Do not generate manifest files for drivers or native apps.

- Get portcls to compile.
- Commit some fixes I forgot.

svn path=/trunk/; revision=20656
This commit is contained in:
Alex Ionescu 2006-01-07 07:40:14 +00:00
parent edd15921f7
commit 38c460379c
6 changed files with 222 additions and 214 deletions

View file

@ -42,8 +42,8 @@ DriverEntry(PDRIVER_OBJECT DriverObject,
/* /*
* @implemented * @implemented
*/ */
DWORD STDCALL ULONG STDCALL
DllInitialize(DWORD Unknown) DllInitialize(ULONG Unknown)
{ {
return 0; return 0;
} }
@ -51,7 +51,7 @@ DllInitialize(DWORD Unknown)
/* /*
* @implemented * @implemented
*/ */
DWORD STDCALL ULONG STDCALL
DllUnload(VOID) DllUnload(VOID)
{ {
return 0; return 0;
@ -63,11 +63,11 @@ DllUnload(VOID)
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcAddAdapterDevice( PcAddAdapterDevice(
DWORD DriverObject, ULONG DriverObject,
DWORD PhysicalDeviceObject, ULONG PhysicalDeviceObject,
DWORD StartDevice, ULONG StartDevice,
DWORD MaxObjects, ULONG MaxObjects,
DWORD DeviceExtensionSize ULONG DeviceExtensionSize
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -79,9 +79,9 @@ PcAddAdapterDevice(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcAddContentHandlers( PcAddContentHandlers(
DWORD ContentId, ULONG ContentId,
DWORD paHandlers, ULONG paHandlers,
DWORD NumHandlers ULONG NumHandlers
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -93,9 +93,9 @@ PcAddContentHandlers(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcCompleteIrp( PcCompleteIrp(
DWORD DeviceObject, ULONG DeviceObject,
DWORD Irp, ULONG Irp,
DWORD Status ULONG Status
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -107,8 +107,8 @@ PcCompleteIrp(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcCompletePendingPropertyRequest( PcCompletePendingPropertyRequest(
DWORD PropertyRequest, ULONG PropertyRequest,
DWORD NtStatus ULONG NtStatus
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -120,9 +120,9 @@ PcCompletePendingPropertyRequest(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcCreateContentMixed( PcCreateContentMixed(
DWORD paContentId, ULONG paContentId,
DWORD cContentId, ULONG cContentId,
DWORD pMixedContentId ULONG pMixedContentId
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -134,7 +134,7 @@ PcCreateContentMixed(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcDestroyContent( PcDestroyContent(
DWORD ContentId ULONG ContentId
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -146,8 +146,8 @@ PcDestroyContent(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcDispatchIrp( PcDispatchIrp(
DWORD DeviceObject, ULONG DeviceObject,
DWORD Irp ULONG Irp
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -159,9 +159,9 @@ PcDispatchIrp(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcForwardContentToDeviceObject( PcForwardContentToDeviceObject(
DWORD ContentId, ULONG ContentId,
DWORD Reserved, ULONG Reserved,
DWORD DrmForward ULONG DrmForward
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -173,8 +173,8 @@ PcForwardContentToDeviceObject(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcForwardContentToFileObject( PcForwardContentToFileObject(
DWORD ContentId, ULONG ContentId,
DWORD FileObject ULONG FileObject
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -186,9 +186,9 @@ PcForwardContentToFileObject(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcForwardContentToInterface( PcForwardContentToInterface(
DWORD ContentId, ULONG ContentId,
DWORD Unknown, ULONG Unknown,
DWORD NumMethods ULONG NumMethods
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -200,8 +200,8 @@ PcForwardContentToInterface(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcForwardIrpSynchronous( PcForwardIrpSynchronous(
DWORD DeviceObject, ULONG DeviceObject,
DWORD Irp ULONG Irp
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -213,8 +213,8 @@ PcForwardIrpSynchronous(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcGetContentRights( PcGetContentRights(
DWORD ContentId, ULONG ContentId,
DWORD DrmRights ULONG DrmRights
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -226,11 +226,11 @@ PcGetContentRights(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcGetDeviceProperty( PcGetDeviceProperty(
DWORD DeviceObject, ULONG DeviceObject,
DWORD DeviceProperty, ULONG DeviceProperty,
DWORD BufferLength, ULONG BufferLength,
DWORD PropertyBuffer, ULONG PropertyBuffer,
DWORD ResultLength ULONG ResultLength
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -257,9 +257,9 @@ PcGetTimeInterval(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcInitializeAdapterDriver( PcInitializeAdapterDriver(
DWORD DriverObject, ULONG DriverObject,
DWORD RegistryPathName, ULONG RegistryPathName,
DWORD AddDevice ULONG AddDevice
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -271,11 +271,11 @@ PcInitializeAdapterDriver(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewDmaChannel( PcNewDmaChannel(
DWORD OutDmaChannel, ULONG OutDmaChannel,
DWORD Unknown, ULONG Unknown,
DWORD PoolType, ULONG PoolType,
DWORD DeviceDescription, ULONG DeviceDescription,
DWORD DeviceObject ULONG DeviceObject
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -287,11 +287,11 @@ PcNewDmaChannel(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewInterruptSync( PcNewInterruptSync(
DWORD OutInterruptSync, ULONG OutInterruptSync,
DWORD Unknown, ULONG Unknown,
DWORD ResourceList, ULONG ResourceList,
DWORD ResourceIndex, ULONG ResourceIndex,
DWORD Mode ULONG Mode
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -303,8 +303,8 @@ PcNewInterruptSync(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewMiniport( PcNewMiniport(
DWORD OutMiniport, ULONG OutMiniport,
DWORD ClassId ULONG ClassId
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -316,8 +316,8 @@ PcNewMiniport(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewPort( PcNewPort(
DWORD OutPort, ULONG OutPort,
DWORD ClassId ULONG ClassId
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -329,15 +329,15 @@ PcNewPort(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewRegistryKey( PcNewRegistryKey(
DWORD OutRegistryKey, ULONG OutRegistryKey,
DWORD Unknown, ULONG Unknown,
DWORD RegistryKeyType, ULONG RegistryKeyType,
DWORD DesiredAccess, ULONG DesiredAccess,
DWORD DeviceObject, ULONG DeviceObject,
DWORD SubDevice, ULONG SubDevice,
DWORD ObjectAttributes, ULONG ObjectAttributes,
DWORD CreateOptions, ULONG CreateOptions,
DWORD Disposition ULONG Disposition
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -349,11 +349,11 @@ PcNewRegistryKey(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewResourceList( PcNewResourceList(
DWORD OutResourceList, ULONG OutResourceList,
DWORD Unknown, ULONG Unknown,
DWORD PoolType, ULONG PoolType,
DWORD TranslatedResources, ULONG TranslatedResources,
DWORD UntranslatedResources ULONG UntranslatedResources
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -365,11 +365,11 @@ PcNewResourceList(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewResourceSublist( PcNewResourceSublist(
DWORD OutResourceList, ULONG OutResourceList,
DWORD Unknown, ULONG Unknown,
DWORD PoolType, ULONG PoolType,
DWORD ParentList, ULONG ParentList,
DWORD MaximumEntries ULONG MaximumEntries
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -381,8 +381,8 @@ PcNewResourceSublist(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcNewServiceGroup( PcNewServiceGroup(
DWORD OutServiceGroup, ULONG OutServiceGroup,
DWORD Unknown ULONG Unknown
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -394,8 +394,8 @@ PcNewServiceGroup(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcRegisterAdapterPowerManagement( PcRegisterAdapterPowerManagement(
DWORD Unknown, ULONG Unknown,
DWORD pvContext ULONG pvContext
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -407,9 +407,9 @@ PcRegisterAdapterPowerManagement(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcRegisterIoTimeout( PcRegisterIoTimeout(
DWORD pDeviceObject, ULONG pDeviceObject,
DWORD pTimerRoutine, ULONG pTimerRoutine,
DWORD pContext ULONG pContext
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -421,11 +421,11 @@ PcRegisterIoTimeout(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcRegisterPhysicalConnection( PcRegisterPhysicalConnection(
DWORD DeviceObject, ULONG DeviceObject,
DWORD FromUnknown, ULONG FromUnknown,
DWORD FromPin, ULONG FromPin,
DWORD ToUnknown, ULONG ToUnknown,
DWORD ToPin ULONG ToPin
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -437,11 +437,11 @@ PcRegisterPhysicalConnection(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcRegisterPhysicalConnectionFromExternal( PcRegisterPhysicalConnectionFromExternal(
DWORD DeviceObject, ULONG DeviceObject,
DWORD FromString, ULONG FromString,
DWORD FromPin, ULONG FromPin,
DWORD ToUnknown, ULONG ToUnknown,
DWORD ToPin ULONG ToPin
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -453,11 +453,11 @@ PcRegisterPhysicalConnectionFromExternal(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcRegisterPhysicalConnectionToExternal( PcRegisterPhysicalConnectionToExternal(
DWORD DeviceObject, ULONG DeviceObject,
DWORD FromUnknown, ULONG FromUnknown,
DWORD FromPin, ULONG FromPin,
DWORD ToString, ULONG ToString,
DWORD ToPin ULONG ToPin
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -469,9 +469,9 @@ PcRegisterPhysicalConnectionToExternal(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcRegisterSubdevice( PcRegisterSubdevice(
DWORD DeviceObject, ULONG DeviceObject,
DWORD SubdevName, ULONG SubdevName,
DWORD Unknown ULONG Unknown
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -483,8 +483,8 @@ PcRegisterSubdevice(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcRequestNewPowerState( PcRequestNewPowerState(
DWORD pDeviceObject, ULONG pDeviceObject,
DWORD RequestedNewState ULONG RequestedNewState
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;
@ -496,9 +496,9 @@ PcRequestNewPowerState(
*/ */
NTSTATUS STDCALL NTSTATUS STDCALL
PcUnregisterIoTimeout( PcUnregisterIoTimeout(
DWORD pDeviceObject, ULONG pDeviceObject,
DWORD pTimerRoutine, ULONG pTimerRoutine,
DWORD pContext ULONG pContext
) )
{ {
UNIMPLEMENTED; UNIMPLEMENTED;

View file

@ -13,96 +13,98 @@
extern "C" { extern "C" {
#endif #endif
/* This header is total bull**** */
#include <ntddk.h> #include <ntddk.h>
#define PORTCLASSAPI extern #define PORTCLASSAPI extern
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcAddAdapterDevice( PcAddAdapterDevice(
DWORD DriverObject, ULONG DriverObject,
DWORD PhysicalDeviceObject, ULONG PhysicalDeviceObject,
DWORD StartDevice, ULONG StartDevice,
DWORD MaxObjects, ULONG MaxObjects,
DWORD DeviceExtensionSize ULONG DeviceExtensionSize
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcAddContentHandlers( PcAddContentHandlers(
DWORD ContentId, ULONG ContentId,
DWORD paHandlers, ULONG paHandlers,
DWORD NumHandlers ULONG NumHandlers
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcCompleteIrp( PcCompleteIrp(
DWORD DeviceObject, ULONG DeviceObject,
DWORD Irp, ULONG Irp,
DWORD Status ULONG Status
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcCompletePendingPropertyRequest( PcCompletePendingPropertyRequest(
DWORD PropertyRequest, ULONG PropertyRequest,
DWORD NtStatus ULONG NtStatus
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcCreateContentMixed( PcCreateContentMixed(
DWORD paContentId, ULONG paContentId,
DWORD cContentId, ULONG cContentId,
DWORD pMixedContentId ULONG pMixedContentId
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcDestroyContent( PcDestroyContent(
DWORD ContentId ULONG ContentId
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcDispatchIrp( PcDispatchIrp(
DWORD DeviceObject, ULONG DeviceObject,
DWORD Irp ULONG Irp
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcForwardContentToDeviceObject( PcForwardContentToDeviceObject(
DWORD ContentId, ULONG ContentId,
DWORD Reserved, ULONG Reserved,
DWORD DrmForward ULONG DrmForward
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcForwardContentToFileObject( PcForwardContentToFileObject(
DWORD ContentId, ULONG ContentId,
DWORD FileObject ULONG FileObject
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcForwardContentToInterface( PcForwardContentToInterface(
DWORD ContentId, ULONG ContentId,
DWORD Unknown, ULONG Unknown,
DWORD NumMethods ULONG NumMethods
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcForwardIrpSynchronous( PcForwardIrpSynchronous(
DWORD DeviceObject, ULONG DeviceObject,
DWORD Irp ULONG Irp
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcGetContentRights( PcGetContentRights(
DWORD ContentId, ULONG ContentId,
DWORD DrmRights ULONG DrmRights
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcGetDeviceProperty( PcGetDeviceProperty(
DWORD DeviceObject, ULONG DeviceObject,
DWORD DeviceProperty, ULONG DeviceProperty,
DWORD BufferLength, ULONG BufferLength,
DWORD PropertyBuffer, ULONG PropertyBuffer,
DWORD ResultLength ULONG ResultLength
); );
PORTCLASSAPI ULONGLONG STDCALL PORTCLASSAPI ULONGLONG STDCALL
@ -112,136 +114,136 @@ PcGetTimeInterval(
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcInitializeAdapterDriver( PcInitializeAdapterDriver(
DWORD DriverObject, ULONG DriverObject,
DWORD RegistryPathName, ULONG RegistryPathName,
DWORD AddDevice ULONG AddDevice
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewDmaChannel( PcNewDmaChannel(
DWORD OutDmaChannel, ULONG OutDmaChannel,
DWORD Unknown, ULONG Unknown,
DWORD PoolType, ULONG PoolType,
DWORD DeviceDescription, ULONG DeviceDescription,
DWORD DeviceObject ULONG DeviceObject
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewInterruptSync( PcNewInterruptSync(
DWORD OutInterruptSync, ULONG OutInterruptSync,
DWORD Unknown, ULONG Unknown,
DWORD ResourceList, ULONG ResourceList,
DWORD ResourceIndex, ULONG ResourceIndex,
DWORD Mode ULONG Mode
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewMiniport( PcNewMiniport(
DWORD OutMiniport, ULONG OutMiniport,
DWORD ClassId ULONG ClassId
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewPort( PcNewPort(
DWORD OutPort, ULONG OutPort,
DWORD ClassId ULONG ClassId
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewRegistryKey( PcNewRegistryKey(
DWORD OutRegistryKey, ULONG OutRegistryKey,
DWORD Unknown, ULONG Unknown,
DWORD RegistryKeyType, ULONG RegistryKeyType,
DWORD DesiredAccess, ULONG DesiredAccess,
DWORD DeviceObject, ULONG DeviceObject,
DWORD SubDevice, ULONG SubDevice,
DWORD ObjectAttributes, ULONG ObjectAttributes,
DWORD CreateOptions, ULONG CreateOptions,
DWORD Disposition ULONG Disposition
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewResourceList( PcNewResourceList(
DWORD OutResourceList, ULONG OutResourceList,
DWORD Unknown, ULONG Unknown,
DWORD PoolType, ULONG PoolType,
DWORD TranslatedResources, ULONG TranslatedResources,
DWORD UntranslatedResources ULONG UntranslatedResources
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewResourceSublist( PcNewResourceSublist(
DWORD OutResourceList, ULONG OutResourceList,
DWORD Unknown, ULONG Unknown,
DWORD PoolType, ULONG PoolType,
DWORD ParentList, ULONG ParentList,
DWORD MaximumEntries ULONG MaximumEntries
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcNewServiceGroup( PcNewServiceGroup(
DWORD OutServiceGroup, ULONG OutServiceGroup,
DWORD Unknown ULONG Unknown
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcRegisterAdapterPowerManagement( PcRegisterAdapterPowerManagement(
DWORD Unknown, ULONG Unknown,
DWORD pvContext ULONG pvContext
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcRegisterIoTimeout( PcRegisterIoTimeout(
DWORD pDeviceObject, ULONG pDeviceObject,
DWORD pTimerRoutine, ULONG pTimerRoutine,
DWORD pContext ULONG pContext
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcRegisterPhysicalConnection( PcRegisterPhysicalConnection(
DWORD DeviceObject, ULONG DeviceObject,
DWORD FromUnknown, ULONG FromUnknown,
DWORD FromPin, ULONG FromPin,
DWORD ToUnknown, ULONG ToUnknown,
DWORD ToPin ULONG ToPin
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcRegisterPhysicalConnectionFromExternal( PcRegisterPhysicalConnectionFromExternal(
DWORD DeviceObject, ULONG DeviceObject,
DWORD FromString, ULONG FromString,
DWORD FromPin, ULONG FromPin,
DWORD ToUnknown, ULONG ToUnknown,
DWORD ToPin ULONG ToPin
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcRegisterPhysicalConnectionToExternal( PcRegisterPhysicalConnectionToExternal(
DWORD DeviceObject, ULONG DeviceObject,
DWORD FromUnknown, ULONG FromUnknown,
DWORD FromPin, ULONG FromPin,
DWORD ToString, ULONG ToString,
DWORD ToPin ULONG ToPin
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcRegisterSubdevice( PcRegisterSubdevice(
DWORD DeviceObject, ULONG DeviceObject,
DWORD SubdevName, ULONG SubdevName,
DWORD Unknown ULONG Unknown
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcRequestNewPowerState( PcRequestNewPowerState(
DWORD pDeviceObject, ULONG pDeviceObject,
DWORD RequestedNewState ULONG RequestedNewState
); );
PORTCLASSAPI NTSTATUS STDCALL PORTCLASSAPI NTSTATUS STDCALL
PcUnregisterIoTimeout( PcUnregisterIoTimeout(
DWORD pDeviceObject, ULONG pDeviceObject,
DWORD pTimerRoutine, ULONG pTimerRoutine,
DWORD pContext ULONG pContext
); );
#ifdef __cplusplus #ifdef __cplusplus

View file

@ -11,6 +11,7 @@ typedef VOID
(*PTCP_COMPLETION_ROUTINE)( PVOID Context, NTSTATUS Status, ULONG Count ); (*PTCP_COMPLETION_ROUTINE)( PVOID Context, NTSTATUS Status, ULONG Count );
/* TCPv4 header structure */ /* TCPv4 header structure */
#include <pshpack1.h>
typedef struct TCPv4_HEADER { typedef struct TCPv4_HEADER {
USHORT SourcePort; /* Source port */ USHORT SourcePort; /* Source port */
USHORT DestinationPort; /* Destination port */ USHORT DestinationPort; /* Destination port */
@ -21,7 +22,7 @@ typedef struct TCPv4_HEADER {
USHORT Window; /* Maximum acceptable receive window */ USHORT Window; /* Maximum acceptable receive window */
USHORT Checksum; /* Checksum of segment */ USHORT Checksum; /* Checksum of segment */
USHORT Urgent; /* Pointer to urgent data */ USHORT Urgent; /* Pointer to urgent data */
} __attribute__((packed)) TCPv4_HEADER, *PTCPv4_HEADER; } TCPv4_HEADER, *PTCPv4_HEADER;
/* TCPv4 header flags */ /* TCPv4 header flags */
#define TCP_URG 0x20 #define TCP_URG 0x20
@ -49,7 +50,8 @@ typedef struct TCPv4_PSEUDO_HEADER {
UCHAR Zero; /* Reserved */ UCHAR Zero; /* Reserved */
UCHAR Protocol; /* Protocol */ UCHAR Protocol; /* Protocol */
USHORT TCPLength; /* Size of TCP segment */ USHORT TCPLength; /* Size of TCP segment */
} __attribute__((packed)) TCPv4_PSEUDO_HEADER, *PTCPv4_PSEUDO_HEADER; } TCPv4_PSEUDO_HEADER, *PTCPv4_PSEUDO_HEADER;
#include <poppack.h>
typedef struct _SLEEPING_THREAD { typedef struct _SLEEPING_THREAD {
LIST_ENTRY Entry; LIST_ENTRY Entry;

View file

@ -11,12 +11,13 @@
#define UDP_DYNAMIC_PORTS 0x8000 #define UDP_DYNAMIC_PORTS 0x8000
/* UDPv4 header structure */ /* UDPv4 header structure */
#include <pshpack1.h>
typedef struct UDP_HEADER { typedef struct UDP_HEADER {
USHORT SourcePort; /* Source port */ USHORT SourcePort; /* Source port */
USHORT DestPort; /* Destination port */ USHORT DestPort; /* Destination port */
USHORT Length; /* Size of header and data */ USHORT Length; /* Size of header and data */
USHORT Checksum; /* Checksum of datagram */ USHORT Checksum; /* Checksum of datagram */
} __attribute__((packed)) UDP_HEADER, *PUDP_HEADER; } UDP_HEADER, *PUDP_HEADER;
/* UDPv4 pseudo header */ /* UDPv4 pseudo header */
typedef struct UDP_PSEUDO_HEADER { typedef struct UDP_PSEUDO_HEADER {
@ -25,8 +26,8 @@ typedef struct UDP_PSEUDO_HEADER {
UCHAR Zero; /* Reserved */ UCHAR Zero; /* Reserved */
UCHAR Protocol; /* Protocol */ UCHAR Protocol; /* Protocol */
USHORT UDPLength; /* Size of UDP datagram */ USHORT UDPLength; /* Size of UDP datagram */
} __attribute__((packed)) UDP_PSEUDO_HEADER, *PUDP_PSEUDO_HEADER; } UDP_PSEUDO_HEADER, *PUDP_PSEUDO_HEADER;
#include <poppack.h>
typedef struct UDP_STATISTICS { typedef struct UDP_STATISTICS {
ULONG InputDatagrams; ULONG InputDatagrams;

View file

@ -5,7 +5,7 @@ typedef struct _RECURSIVE_MUTEX {
/* Lock. */ /* Lock. */
FAST_MUTEX Mutex; FAST_MUTEX Mutex;
/* Number of times this object was locked */ /* Number of times this object was locked */
UINT LockCount; SIZE_T LockCount;
/* CurrentThread */ /* CurrentThread */
PVOID CurrentThread; PVOID CurrentThread;
/* Notification event which signals that another thread can take over */ /* Notification event which signals that another thread can take over */
@ -21,7 +21,7 @@ typedef struct _RECURSIVE_MUTEX {
} RECURSIVE_MUTEX, *PRECURSIVE_MUTEX; } RECURSIVE_MUTEX, *PRECURSIVE_MUTEX;
extern VOID RecursiveMutexInit( PRECURSIVE_MUTEX RecMutex ); extern VOID RecursiveMutexInit( PRECURSIVE_MUTEX RecMutex );
extern UINT RecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOL ToRead ); extern SIZE_T RecursiveMutexEnter( PRECURSIVE_MUTEX RecMutex, BOOLEAN ToRead );
extern VOID RecursiveMutexLeave( PRECURSIVE_MUTEX RecMutex ); extern VOID RecursiveMutexLeave( PRECURSIVE_MUTEX RecMutex );
#endif/*_ROSRTL_RECMUTEX_H*/ #endif/*_ROSRTL_RECMUTEX_H*/

View file

@ -388,6 +388,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
{ {
fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" ); fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20 /SECTION:INIT,D /IGNORE:4001,4037,4039,4065,4070,4078,4087,4089,4096\"\r\n" );
fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 ); fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 );
fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 ); fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 );
fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.entrypoint == "" ? "DriverEntry" : module.entrypoint.c_str ()); fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"%s\"\r\n", module.entrypoint == "" ? "DriverEntry" : module.entrypoint.c_str ());
@ -399,6 +400,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
{ {
fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SECTION:INIT,D /ALIGN:0x80\"\r\n" ); fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /SECTION:INIT,D /ALIGN:0x80\"\r\n" );
fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 ); fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 3 );
fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 ); fprintf ( OUT, "\t\t\t\tDriver=\"%d\"\r\n", 1 );
fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"KiSystemStartup\"\r\n" ); fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"KiSystemStartup\"\r\n" );
@ -408,6 +410,7 @@ MSVCBackend::_generate_vcproj ( const Module& module )
{ {
fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20\"\r\n" ); fprintf ( OUT, "\t\t\t\tAdditionalOptions=\" /ALIGN:0x20\"\r\n" );
fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 1 ); fprintf ( OUT, "\t\t\t\tSubSystem=\"%d\"\r\n", 1 );
fprintf ( OUT, "\t\t\t\tGenerateManifest=\"FALSE\"\r\n" );
fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" ); fprintf ( OUT, "\t\t\t\tIgnoreAllDefaultLibraries=\"TRUE\"\r\n" );
fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"NtProcessStartup\"\r\n" ); fprintf ( OUT, "\t\t\t\tEntryPointSymbol=\"NtProcessStartup\"\r\n" );
fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ()); fprintf ( OUT, "\t\t\t\tBaseAddress=\"%s\"\r\n", baseaddr.c_str ());