Author: janderwald
Date: Thu Jul 23 23:32:39 2009
New Revision: 42164
URL:
http://svn.reactos.org/svn/reactos?rev=42164&view=rev
Log:
- Add calling convention for callback typedefs
- Ros needs msvc!
Modified:
trunk/reactos/include/psdk/ks.h
Modified: trunk/reactos/include/psdk/ks.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/ks.h?rev=4216…
==============================================================================
--- trunk/reactos/include/psdk/ks.h [iso-8859-1] (original)
+++ trunk/reactos/include/psdk/ks.h [iso-8859-1] Thu Jul 23 23:32:39 2009
@@ -1104,7 +1104,7 @@
#if defined(_NTDDK_)
/* MOVE ME */
-typedef NTSTATUS (*PFNKSCONTEXT_DISPATCH)(
+typedef NTSTATUS NTAPI NTAPI (*PFNKSCONTEXT_DISPATCH)(
IN PVOID Context,
IN PIRP Irp);
#endif
@@ -1259,13 +1259,15 @@
#define KSPROPERTY_ATTRIBUTES_IRP_STORAGE(Irp)
(*(PKSATTRIBUTE_LIST*)&(Irp)->Tail.Overlay.DriverContext[2])
typedef
-VOID
+VOID
+NTAPI
(*PFNREFERENCEDEVICEOBJECT)(
IN PVOID Context
);
typedef
-VOID
+VOID
+NTAPI
(*PFNDEREFERENCEDEVICEOBJECT)(
IN PVOID Context
);
@@ -1436,7 +1438,7 @@
} KSPROPERTY_VALUES, *PKSPROPERTY_VALUES;
#if defined(_NTDDK_)
-typedef NTSTATUS (*PFNKSHANDLER)(
+typedef NTSTATUS NTAPI(*PFNKSHANDLER)(
IN PIRP Irp,
IN PKSIDENTIFIER Request,
IN OUT PVOID Data);
@@ -1868,13 +1870,14 @@
LONGLONG Interval;
} KSEVENT_TIME_INTERVAL, *PKSEVENT_TIME_INTERVAL;
-typedef NTSTATUS (*PFNKSADDEVENT)(
+typedef NTSTATUS NTAPI (*PFNKSADDEVENT)(
IN PIRP Irp,
IN PKSEVENTDATA EventData,
IN struct _KSEVENT_ENTRY* EventEntry);
typedef
VOID
+NTAPI
(*PFNKSREMOVEEVENT)(
IN PFILE_OBJECT FileObject,
IN struct _KSEVENT_ENTRY* EventEntry
@@ -1938,6 +1941,7 @@
typedef
NTSTATUS
+NTAPI
(*PFNKSPINHANDSHAKE)(
IN PKSPIN Pin,
IN PKSHANDSHAKE In,
@@ -1946,6 +1950,7 @@
typedef
void
+NTAPI
(*PFNKSPINPOWER)(
IN PKSPIN Pin,
IN DEVICE_POWER_STATE State
@@ -1953,6 +1958,7 @@
typedef
void
+NTAPI
(*PFNKSPINFRAMERETURN)(
IN PKSPIN Pin,
IN PVOID Data OPTIONAL,
@@ -1964,6 +1970,7 @@
typedef
void
+NTAPI
(*PFNKSPINIRPCOMPLETION)(
IN PKSPIN Pin,
IN PIRP Irp
@@ -1971,6 +1978,7 @@
typedef
NTSTATUS
+NTAPI
(*PFNKSPINIRP)(
IN PKSPIN Pin,
IN PIRP Irp
@@ -1978,18 +1986,21 @@
typedef
NTSTATUS
+NTAPI
(*PFNKSPIN)(
IN PKSPIN Pin
);
typedef
void
+NTAPI
(*PFNKSPINVOID)(
IN PKSPIN Pin
);
typedef
void
+NTAPI
(*PFNKSSTREAMPOINTER)(
IN PKSSTREAM_POINTER StreamPointer
);
@@ -2001,6 +2012,7 @@
typedef
NTSTATUS
+NTAPI
(*PFNKSPINSETDATAFORMAT)(
IN PKSPIN Pin,
IN PKSDATAFORMAT OldFormat OPTIONAL,
@@ -2011,6 +2023,7 @@
typedef
NTSTATUS
+NTAPI
(*PFNKSPINSETDEVICESTATE)(
IN PKSPIN Pin,
IN KSSTATE ToState,
@@ -2036,7 +2049,7 @@
typedef
BOOLEAN
-(*PFNKSPINSETTIMER)(
+NTAPI (*PFNKSPINSETTIMER)(
IN PKSPIN Pin,
IN PKTIMER Timer,
IN LARGE_INTEGER DueTime,
@@ -2045,7 +2058,7 @@
typedef
BOOLEAN
-(*PFNKSPINCANCELTIMER)(
+NTAPI (*PFNKSPINCANCELTIMER)(
IN PKSPIN Pin,
IN PKTIMER Timer
);
@@ -2059,7 +2072,7 @@
typedef
void
-(*PFNKSPINRESOLUTION)(
+NTAPI (*PFNKSPINRESOLUTION)(
IN PKSPIN Pin,
OUT PKSRESOLUTION Resolution
);
@@ -2073,19 +2086,19 @@
typedef
NTSTATUS
-(*PFNKSPININITIALIZEALLOCATOR)(
+NTAPI (*PFNKSPININITIALIZEALLOCATOR)(
IN PKSPIN Pin,
IN PKSALLOCATOR_FRAMING AllocatorFraming,
OUT PVOID* Context
);
-typedef PVOID (*PFNKSDELETEALLOCATOR)(
+typedef PVOID NTAPI (*PFNKSDELETEALLOCATOR)(
IN PVOID Context);
-typedef PVOID (*PFNKSDEFAULTALLOCATE)(
+typedef PVOID NTAPI (*PFNKSDEFAULTALLOCATE)(
IN PVOID Context);
-typedef PVOID (*PFNKSDEFAULTFREE)(
+typedef PVOID NTAPI (*PFNKSDEFAULTFREE)(
IN PVOID Context,
IN PVOID Buffer);
@@ -2137,7 +2150,7 @@
typedef
NTSTATUS
-(*PFNKSINTERSECTHANDLER)(
+NTAPI (*PFNKSINTERSECTHANDLER)(
IN PIRP Irp,
IN PKSP_PIN Pin,
IN PKSDATARANGE DataRange,
@@ -2146,7 +2159,7 @@
typedef
NTSTATUS
-(*PFNKSINTERSECTHANDLEREX)(
+NTAPI (*PFNKSINTERSECTHANDLEREX)(
IN PVOID Context,
IN PIRP Irp,
IN PKSP_PIN Pin,
@@ -2367,7 +2380,7 @@
typedef
void
-(*PFNKSFREE)(
+NTAPI (*PFNKSFREE)(
IN PVOID Data
);
@@ -2465,12 +2478,12 @@
OUT PVOID* Context);
#if defined(_NTDDK_)
-typedef NTSTATUS (*PFNKSALLOCATOR)(
+typedef NTSTATUS NTAPI (*PFNKSALLOCATOR)(
IN PIRP Irp,
IN ULONG BufferSize,
IN BOOLEAN InputOperation);
-typedef NTSTATUS (*PFNKINTERSECTHANDLEREX)(
+typedef NTSTATUS NTAPI (*PFNKINTERSECTHANDLEREX)(
IN PVOID Context,
IN PIRP Irp,
IN PKSP_PIN Pin,
@@ -2484,7 +2497,7 @@
typedef
NTSTATUS
NTAPI
-(*PFNALLOCATOR_ALLOCATEFRAME)(
+NTAPI (*PFNALLOCATOR_ALLOCATEFRAME)(
IN PFILE_OBJECT FileObject,
PVOID *Frame
);
@@ -2492,7 +2505,7 @@
typedef
VOID
NTAPI
-(*PFNALLOCATOR_FREEFRAME)(
+NTAPI (*PFNALLOCATOR_FREEFRAME)(
IN PFILE_OBJECT FileObject,
IN PVOID Frame
);
@@ -2619,32 +2632,32 @@
typedef struct _KSFILTER_DESCRIPTOR KSFILTER_DESCRIPTOR, *PKSFILTER_DESCRIPTOR;
typedef struct _KSDEVICE_DESCRIPTOR KSDEVICE_DESCRIPTOR, *PKSDEVICE_DESCRIPTOR;
-typedef NTSTATUS (*PFNKSDEVICECREATE)(
+typedef NTSTATUS NTAPI (*PFNKSDEVICECREATE)(
IN PKSDEVICE Device);
-typedef NTSTATUS (*PFNKSDEVICEPNPSTART)(
+typedef NTSTATUS NTAPI (*PFNKSDEVICEPNPSTART)(
IN PKSDEVICE Device,
IN PIRP Irp,
IN PCM_RESOURCE_LIST TranslatedResourceList OPTIONAL,
IN PCM_RESOURCE_LIST UntranslatedResourceList OPTIONAL);
-typedef NTSTATUS (*PFNKSDEVICE)(
+typedef NTSTATUS NTAPI (*PFNKSDEVICE)(
IN PKSDEVICE Device);
-typedef NTSTATUS (*PFNKSDEVICEIRP)(
+typedef NTSTATUS NTAPI (*PFNKSDEVICEIRP)(
IN PKSDEVICE Device,
IN PIRP Irp);
-typedef VOID (*PFNKSDEVICEIRPVOID)(
+typedef VOID NTAPI (*PFNKSDEVICEIRPVOID)(
IN PKSDEVICE Device,
IN PIRP Irp);
-typedef NTSTATUS (*PFNKSDEVICEQUERYCAPABILITIES)(
+typedef NTSTATUS NTAPI (*PFNKSDEVICEQUERYCAPABILITIES)(
IN PKSDEVICE Device,
IN PIRP Irp,
IN OUT PDEVICE_CAPABILITIES Capabilities);
-typedef NTSTATUS (*PFNKSDEVICEQUERYPOWER)(
+typedef NTSTATUS NTAPI (*PFNKSDEVICEQUERYPOWER)(
IN PKSDEVICE Device,
IN PIRP Irp,
IN DEVICE_POWER_STATE DeviceTo,
@@ -2653,7 +2666,7 @@
IN SYSTEM_POWER_STATE SystemFrom,
IN POWER_ACTION Action);
-typedef VOID (*PFNKSDEVICESETPOWER)(
+typedef VOID NTAPI (*PFNKSDEVICESETPOWER)(
IN PKSDEVICE Device,
IN PIRP Irp,
IN DEVICE_POWER_STATE To,
@@ -2708,20 +2721,20 @@
typedef
void
-(*PFNKSFILTERPOWER)(
+NTAPI (*PFNKSFILTERPOWER)(
IN PKSFILTER Filter,
IN DEVICE_POWER_STATE State
);
-typedef NTSTATUS (*PFNKSFILTERIRP)(
+typedef NTSTATUS NTAPI (*PFNKSFILTERIRP)(
IN PKSFILTER Filter,
IN PIRP Irp);
-typedef NTSTATUS (*PFNKSFILTERPROCESS)(
- IN PKSFILTER FIlter,
+typedef NTSTATUS NTAPI (*PFNKSFILTERPROCESS)(
+ IN PKSFILTER Filter,
IN PKSPROCESSPIN_INDEXENTRY ProcessPinsIndex);
-typedef NTSTATUS (*PFNKSFILTERVOID)(
+typedef NTSTATUS NTAPI (*PFNKSFILTERVOID)(
IN PKSFILTER Filter);
struct _KSFILTER_DISPATCH
@@ -2779,12 +2792,12 @@
Minidriver Callbacks
*/
#if defined(_NTDDK_)
-typedef NTSTATUS (*KStrMethodHandler)(
+typedef NTSTATUS NTAPI (*KStrMethodHandler)(
IN PIRP Irp,
IN PKSIDENTIFIER Request,
IN OUT PVOID Data);
-typedef NTSTATUS (*KStrSupportHandler)(
+typedef NTSTATUS NTAPI (*KStrSupportHandler)(
IN PIRP Irp,
IN PKSIDENTIFIER Request,
IN OUT PVOID Data);
@@ -2829,13 +2842,13 @@
Clock Functions
*/
#if defined(_NTDDK_)
-typedef BOOLEAN (*PFNKSSETTIMER)(
+typedef BOOLEAN NTAPI (*PFNKSSETTIMER)(
IN PVOID Context,
IN PKTIMER Timer,
IN LARGE_INTEGER DueTime,
IN PKDPC Dpc);
-typedef BOOLEAN (*PFNKSCANCELTIMER)(
+typedef BOOLEAN NTAPI (*PFNKSCANCELTIMER)(
IN PVOID Context,
IN PKTIMER Timer);
@@ -3001,7 +3014,7 @@
typedef
BOOLEAN
-(*PFNKSGENERATEEVENTCALLBACK)(
+NTAPI (*PFNKSGENERATEEVENTCALLBACK)(
IN PVOID Context,
IN PKSEVENT_ENTRY EventEntry
);
@@ -3152,7 +3165,7 @@
IRP Helper Functions
*/
-typedef NTSTATUS (*PFNKSIRPLISTCALLBACK)(
+typedef NTSTATUS NTAPI (*PFNKSIRPLISTCALLBACK)(
IN PIRP Irp,
IN PVOID Context);
@@ -3585,7 +3598,7 @@
IN const KSDEVICE_DESCRIPTOR* Descriptor OPTIONAL);
-typedef void (*PFNKSFILTERFACTORYPOWER)(
+typedef void NTAPI (*PFNKSFILTERFACTORYPOWER)(
IN PKSFILTERFACTORY FilterFactory,
IN DEVICE_POWER_STATE State);