Author: tkreuzer
Date: Sun May 11 23:11:16 2014
New Revision: 63247
URL:
http://svn.reactos.org/svn/reactos?rev=63247&view=rev
Log:
[DDK/XDK/NTOSKRNL/DRIVERS]
Fix incompatible definition of a number of NTOSKRNL data imports. These imports are
declared in MS DDK in a way that is usually not how you would declare data imports. The
proper way of doing it is using _DECLSPEC_INTRIN_TYPE(dllimport) or in this case
NTKERNELAPI, which will cause the compiler to directly dereference the __imp__FooBar
symbol. MS has declared some of these variables directly as pointers without using
dllimport. This works with MS DDK, since it's import libraries contain aliases (like
_FooBar) to the import symbols (__imp__FooBar). Neither MS LINK nor DLLTOOL create these
aliases in the import libs, which is good, since hacks like these are dangerous. To make
the original declarations work without using macros (which can conflict with other things,
like for example the KdDebuggerEnabled member in KUSER_SHARED_DATA) these aliases have to
be generated differently. Luckily both MSVC and GCC support a pragma that does exactly
this. Fix the incompatible use in our drivers and the broen(!) use of KdDebuggerEnabled in
kdcom (which was writing a PBOOLEAN value (FALSE == 0 == NULL, so no warning) into the
location that is really a BOOLEAN, possibly overwriting other data. Finally get rid of a
number of hacks in ntoskrnl, where prefixed versions were used to not conflict with the
DDK definitions.
Modified:
trunk/reactos/drivers/base/kdcom/kdserial.c
trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c
trunk/reactos/drivers/filters/mountmgr/device.c
trunk/reactos/drivers/ksfilter/ks/event.c
trunk/reactos/drivers/ksfilter/ks/pin.c
trunk/reactos/drivers/network/afd/afd/bind.c
trunk/reactos/drivers/network/afd/afd/select.c
trunk/reactos/drivers/network/afd/afd/tdi.c
trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
trunk/reactos/drivers/storage/floppy/floppy.c
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/deviface.c
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c
trunk/reactos/drivers/wdm/audio/legacy/wdmaud/sup.c
trunk/reactos/drivers/wdm/audio/sysaudio/deviface.c
trunk/reactos/drivers/wdm/audio/sysaudio/pin.c
trunk/reactos/include/ddk/ntddk.h
trunk/reactos/include/ddk/ntifs.h
trunk/reactos/include/ddk/wdm.h
trunk/reactos/include/reactos/libs/pseh/pseh3.h
trunk/reactos/include/xdk/ccfuncs.h
trunk/reactos/include/xdk/extypes.h
trunk/reactos/include/xdk/fsrtlfuncs.h
trunk/reactos/include/xdk/haltypes.h
trunk/reactos/include/xdk/ia64/ke.h
trunk/reactos/include/xdk/iotypes.h
trunk/reactos/include/xdk/kdfuncs.h
trunk/reactos/include/xdk/ketypes.h
trunk/reactos/include/xdk/mmtypes.h
trunk/reactos/include/xdk/ntifs.template.h
trunk/reactos/include/xdk/obtypes.h
trunk/reactos/include/xdk/rtltypes.h
trunk/reactos/include/xdk/sefuncs.h
trunk/reactos/include/xdk/wdm.template.h
trunk/reactos/lib/rtl/nls.c
trunk/reactos/ntoskrnl/ex/event.c
trunk/reactos/ntoskrnl/ex/sem.c
trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c
trunk/reactos/ntoskrnl/include/internal/fsrtl.h
trunk/reactos/ntoskrnl/include/internal/kd.h
trunk/reactos/ntoskrnl/include/internal/kd64.h
trunk/reactos/ntoskrnl/include/ntoskrnl.h
trunk/reactos/ntoskrnl/kd64/kdapi.c
trunk/reactos/ntoskrnl/kd64/kddata.c
trunk/reactos/ntoskrnl/kd64/kdinit.c
trunk/reactos/ntoskrnl/ntoskrnl.spec
trunk/reactos/tools/spec2def/spec2def.c
trunk/reactos/win32ss/gdi/eng/engevent.c
trunk/reactos/win32ss/user/ntuser/main.c
trunk/reactos/win32ss/user/ntuser/message.c
trunk/reactos/win32ss/user/ntuser/misc.c
Modified: trunk/reactos/drivers/base/kdcom/kdserial.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/base/kdcom/kdseria…
==============================================================================
--- trunk/reactos/drivers/base/kdcom/kdserial.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/base/kdcom/kdserial.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -38,7 +38,7 @@
* \brief Receives data from the KD port and fills a buffer.
* \param Buffer Pointer to a buffer that receives the data.
* \param Size Size of data to receive in bytes.
- * \return KDP_PACKET_RECEIVED if successful.
+ * \return KDP_PACKET_RECEIVED if successful.
* KDP_PACKET_TIMEOUT if the receice timed out.
*/
KDP_STATUS
@@ -69,7 +69,7 @@
* \name KdpReceivePacketLeader
* \brief Receives a packet leadr from the KD port.
* \param PacketLeader Pointer to an ULONG that receives the packet leader.
- * \return KDP_PACKET_RECEIVED if successful.
+ * \return KDP_PACKET_RECEIVED if successful.
* KDP_PACKET_TIMEOUT if the receive timed out.
* KDP_PACKET_RESEND if a breakin byte was detected.
*/
@@ -141,7 +141,7 @@
while (Index < 4);
/* Enable the debugger */
- KdDebuggerNotPresent = FALSE;
+ KD_DEBUGGER_NOT_PRESENT = FALSE;
SharedUserData->KdDebuggerEnabled |= 0x00000002;
/* Return the received packet leader */
Modified: trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/compbatt/…
==============================================================================
--- trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/bus/acpi/compbatt/compmisc.c [iso-8859-1] Sun May 11 23:11:16
2014
@@ -14,7 +14,7 @@
NTSTATUS
NTAPI
-BatteryIoctl(IN ULONG IoControlCode,
+BatteryIoctl(IN ULONG IoControlCode,
IN PDEVICE_OBJECT DeviceObject,
IN PVOID InputBuffer,
IN ULONG InputBufferLength,
@@ -50,11 +50,11 @@
KeWaitForSingleObject(&Event, Executive, KernelMode, FALSE, NULL);
Status = IoStatusBlock.Status;
}
-
+
/* Print failure */
if (!(NT_SUCCESS(Status)) && (CompBattDebug & 8))
DbgPrint("BatteryIoctl: Irp failed - %x\n", Status);
-
+
/* Done */
if (CompBattDebug & 0x100) DbgPrint("CompBatt: EXITING
BatteryIoctl\n");
}
@@ -64,7 +64,7 @@
if (CompBattDebug & 8) DbgPrint("BatteryIoctl: couldn't create
Irp\n");
Status = STATUS_INSUFFICIENT_RESOURCES;
}
-
+
/* Return status */
return Status;
}
@@ -82,7 +82,7 @@
PFILE_OBJECT LocalFileObject;
HANDLE DeviceHandle;
PAGED_CODE();
-
+
/* Open a file object handle to the device */
InitializeObjectAttributes(&ObjectAttributes, DeviceName, 0, NULL, NULL);
Status = ZwCreateFile(&DeviceHandle,
@@ -101,7 +101,7 @@
/* Reference the file object */
Status = ObReferenceObjectByHandle(DeviceHandle,
0,
- IoFileObjectType,
+ *IoFileObjectType,
KernelMode,
(PVOID)&LocalFileObject,
NULL);
@@ -111,11 +111,11 @@
*FileObject = LocalFileObject;
*DeviceObject = IoGetRelatedDeviceObject(LocalFileObject);
}
-
+
/* Close the handle */
ZwClose(DeviceHandle);
}
-
+
/* Return status */
return Status;
}
Modified: trunk/reactos/drivers/filters/mountmgr/device.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/filters/mountmgr/d…
==============================================================================
--- trunk/reactos/drivers/filters/mountmgr/device.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/filters/mountmgr/device.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -1552,7 +1552,7 @@
}
/* Reference it */
- Status = ObReferenceObjectByHandle(Handle, 0, IoFileObjectType, KernelMode, (PVOID
*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(Handle, 0, *IoFileObjectType, KernelMode, (PVOID
*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
goto Cleanup;
Modified: trunk/reactos/drivers/ksfilter/ks/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/event.…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/event.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/event.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -99,7 +99,7 @@
KSEVENT Event;
PKSEVENT_ITEM EventItem, FoundEventItem;
PKSEVENTDATA EventData;
- const KSEVENT_SET* FoundEventSet;
+ const KSEVENT_SET *FoundEventSet;
PKSEVENT_ENTRY EventEntry;
ULONG Index, SubIndex, Size;
PVOID Object;
@@ -234,7 +234,7 @@
if (EventData->NotificationType == KSEVENTF_SEMAPHORE_HANDLE)
{
/* get semaphore object handle */
- Status = ObReferenceObjectByHandle(EventData->SemaphoreHandle.Semaphore,
SEMAPHORE_MODIFY_STATE, ExSemaphoreObjectType, Irp->RequestorMode, &Object, NULL);
+ Status = ObReferenceObjectByHandle(EventData->SemaphoreHandle.Semaphore,
SEMAPHORE_MODIFY_STATE, *ExSemaphoreObjectType, Irp->RequestorMode, &Object,
NULL);
if (!NT_SUCCESS(Status))
{
@@ -245,7 +245,7 @@
else if (EventData->NotificationType == KSEVENTF_EVENT_HANDLE)
{
/* get event object handle */
- Status = ObReferenceObjectByHandle(EventData->EventHandle.Event,
EVENT_MODIFY_STATE, ExEventObjectType, Irp->RequestorMode, &Object, NULL);
+ Status = ObReferenceObjectByHandle(EventData->EventHandle.Event,
EVENT_MODIFY_STATE, *ExEventObjectType, Irp->RequestorMode, &Object, NULL);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/drivers/ksfilter/ks/pin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/ksfilter/ks/pin.c?…
==============================================================================
--- trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/ksfilter/ks/pin.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -193,7 +193,7 @@
{
Mode = ExGetPreviousMode();
- Status = ObReferenceObjectByHandle(*Handle, SYNCHRONIZE |
DIRECTORY_QUERY, IoFileObjectType, Mode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(*Handle, SYNCHRONIZE |
DIRECTORY_QUERY, *IoFileObjectType, Mode, (PVOID*)&FileObject, NULL);
DPRINT("IKsPin_PinMasterClock ObReferenceObjectByHandle %lx\n",
Status);
if (NT_SUCCESS(Status))
@@ -2221,7 +2221,7 @@
pResolution = &Resolution;
}
- Status = KsAllocateDefaultClockEx(&This->DefaultClock,
+ Status = KsAllocateDefaultClockEx(&This->DefaultClock,
(PVOID)&This->Pin,
(PFNKSSETTIMER)This->Pin.Descriptor->Dispatch->Clock->SetTimer,
(PFNKSCANCELTIMER)This->Pin.Descriptor->Dispatch->Clock->CancelTimer,
@@ -2265,7 +2265,7 @@
return STATUS_NOT_IMPLEMENTED;
}
-static KSDISPATCH_TABLE PinDispatchTable =
+static KSDISPATCH_TABLE PinDispatchTable =
{
IKsPin_DispatchDeviceIoControl,
KsDispatchInvalidDeviceRequest,
@@ -2329,10 +2329,10 @@
DPRINT("KspCreatePin Index %lu FileAlignment %lx\n", Index,
Descriptor->AllocatorFraming->FramingItem[Index].FileAlignment);
DPRINT("KspCreatePin Index %lu MemoryTypeWeight %lx\n", Index,
Descriptor->AllocatorFraming->FramingItem[Index].MemoryTypeWeight);
DPRINT("KspCreatePin Index %lu PhysicalRange MinFrameSize %lu
MaxFrameSize %lu Stepping %lu\n", Index,
Descriptor->AllocatorFraming->FramingItem[Index].PhysicalRange.MinFrameSize,
-
Descriptor->AllocatorFraming->FramingItem[Index].PhysicalRange.MaxFrameSize,
+
Descriptor->AllocatorFraming->FramingItem[Index].PhysicalRange.MaxFrameSize,
Descriptor->AllocatorFraming->FramingItem[Index].PhysicalRange.Stepping);
- DPRINT("KspCreatePin Index %lu FramingRange MinFrameSize %lu
MaxFrameSize %lu Stepping %lu InPlaceWeight %lu NotInPlaceWeight %lu\n",
+ DPRINT("KspCreatePin Index %lu FramingRange MinFrameSize %lu
MaxFrameSize %lu Stepping %lu InPlaceWeight %lu NotInPlaceWeight %lu\n",
Index,
Descriptor->AllocatorFraming->FramingItem[Index].FramingRange.Range.MinFrameSize,
Descriptor->AllocatorFraming->FramingItem[Index].FramingRange.Range.MaxFrameSize,
Modified: trunk/reactos/drivers/network/afd/afd/bind.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/bi…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/bind.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -105,7 +105,7 @@
0,
NULL,
MAXIMUM_ALLOWED,
- IoFileObjectType,
+ *IoFileObjectType,
Irp->RequestorMode,
&UserHandle);
if (NT_SUCCESS(Status))
Modified: trunk/reactos/drivers/network/afd/afd/select.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/se…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/select.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -289,7 +289,7 @@
Status = ObReferenceObjectByHandle( (PVOID)EventSelectInfo->
EventObject,
EVENT_ALL_ACCESS,
- ExEventObjectType,
+ *ExEventObjectType,
UserMode,
(PVOID *)&FCB->EventSelect,
NULL );
@@ -346,7 +346,7 @@
Status = ObReferenceObjectByHandle(EnumReq->Event,
EVENT_ALL_ACCESS,
- ExEventObjectType,
+ *ExEventObjectType,
UserMode,
(PVOID *)&UserEvent,
NULL);
Modified: trunk/reactos/drivers/network/afd/afd/tdi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/afd/afd/td…
==============================================================================
--- trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/afd/afd/tdi.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -144,7 +144,7 @@
if (NT_SUCCESS(Status)) {
Status = ObReferenceObjectByHandle(*Handle, /* Handle to
open file */
GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE,
/* Access mode */
- IoFileObjectType, /* Object type
*/
+ *IoFileObjectType, /* Object type
*/
KernelMode, /* Access mode
*/
(PVOID*)Object, /* Pointer to
object */
NULL); /* Handle
information */
Modified: trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/tcpip/tcpi…
==============================================================================
--- trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/network/tcpip/tcpip/dispatch.c [iso-8859-1] Sun May 11 23:11:16
2014
@@ -173,7 +173,7 @@
case TDI_CONNECT:
DequeuedIrp = TCPRemoveIRP(TranContext->Handle.ConnectionContext, Irp);
break;
-
+
case TDI_DISCONNECT:
Connection = (PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext;
@@ -303,7 +303,7 @@
Status = ObReferenceObjectByHandle(
Parameters->AddressHandle,
0,
- IoFileObjectType,
+ *IoFileObjectType,
KernelMode,
(PVOID*)&FileObject,
NULL);
@@ -511,7 +511,7 @@
Status = STATUS_INVALID_PARAMETER;
goto done;
}
-
+
Status = DispPrepareIrpForCancel
(TranContext->Handle.ConnectionContext,
Irp,
@@ -716,7 +716,7 @@
case TDI_CONNECTION_FILE:
Endpoint =
(PCONNECTION_ENDPOINT)TranContext->Handle.ConnectionContext;
-
+
Address->TAAddressCount = 1;
Address->Address[0].AddressLength = TDI_ADDRESS_LENGTH_IP;
Address->Address[0].AddressType = TDI_ADDRESS_TYPE_IP;
@@ -761,12 +761,12 @@
case TDI_QUERY_MAX_DATAGRAM_INFO:
{
PTDI_MAX_DATAGRAM_INFO MaxDatagramInfo;
-
+
if (MmGetMdlByteCount(Irp->MdlAddress) < sizeof(*MaxDatagramInfo)) {
TI_DbgPrint(MID_TRACE, ("MDL buffer too small.\n"));
return STATUS_BUFFER_TOO_SMALL;
}
-
+
MaxDatagramInfo = (PTDI_MAX_DATAGRAM_INFO)
MmGetSystemAddressForMdl(Irp->MdlAddress);
@@ -1560,7 +1560,7 @@
IF->Netmask.Type = IP_ADDRESS_V4;
IF->Netmask.Address.IPv4Address = IpAddrChange->Netmask;
-
+
IF->Broadcast.Type = IP_ADDRESS_V4;
IF->Broadcast.Address.IPv4Address =
IF->Unicast.Address.IPv4Address |
Modified: trunk/reactos/drivers/storage/floppy/floppy.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/storage/floppy/flo…
==============================================================================
--- trunk/reactos/drivers/storage/floppy/floppy.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/storage/floppy/floppy.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -761,9 +761,9 @@
HeadLoadTime = SPECIFY_HLT_500K;
HeadUnloadTime = SPECIFY_HUT_500K;
StepRateTime = SPECIFY_SRT_500K;
-
+
INFO_(FLOPPY, "InitController: setting data rate\n");
-
+
/* Set data rate */
if(HwSetDataRate(ControllerInfo, DRSR_DSEL_500KBPS) != STATUS_SUCCESS)
{
@@ -1176,7 +1176,7 @@
return STATUS_INSUFFICIENT_RESOURCES;
}
- if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, PsThreadType,
KernelMode, &QueueThreadObject, NULL) != STATUS_SUCCESS)
+ if(ObReferenceObjectByHandle(ThreadHandle, STANDARD_RIGHTS_ALL, *PsThreadType,
KernelMode, &QueueThreadObject, NULL) != STATUS_SUCCESS)
{
WARN_(FLOPPY, "Unable to reference returned thread handle; failing
init\n");
return STATUS_UNSUCCESSFUL;
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/control.c [iso-8859-1] Sun May 11
23:11:16 2014
@@ -97,7 +97,7 @@
DPRINT("WdmAudControlDeviceState\n");
- Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_READ |
GENERIC_WRITE, IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_READ |
GENERIC_WRITE, *IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Error: invalid device handle provided %p Type %x\n",
DeviceInfo->hDevice, DeviceInfo->DeviceType);
@@ -197,7 +197,7 @@
NTSTATUS Status;
/* Get sysaudio pin file object */
- Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_WRITE,
IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_WRITE,
*IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Invalid buffer handle %p\n", DeviceInfo->hDevice);
@@ -290,7 +290,7 @@
DPRINT("WdmAudResetStream\n");
- Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_READ |
GENERIC_WRITE, IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_READ |
GENERIC_WRITE, *IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Error: invalid device handle provided %p Type %x\n",
DeviceInfo->hDevice, DeviceInfo->DeviceType);
@@ -528,7 +528,7 @@
ASSERT(DeviceInfo);
/* now get sysaudio file object */
- Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_WRITE,
IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(DeviceInfo->hDevice, GENERIC_WRITE,
*IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Invalid pin handle %p\n", DeviceInfo->hDevice);
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/deviface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/deviface.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/deviface.c [iso-8859-1] Sun May 11
23:11:16 2014
@@ -165,7 +165,7 @@
}
/* get the file object */
- Status = ObReferenceObjectByHandle(hSysAudio, FILE_READ_DATA |
FILE_WRITE_DATA, IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(hSysAudio, FILE_READ_DATA |
FILE_WRITE_DATA, *IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("Failed to reference FileObject %x\n", Status);
@@ -200,7 +200,7 @@
}
/* failed to register device interface
- * create a symbolic link instead
+ * create a symbolic link instead
*/
DeviceExtension->DeviceInterfaceSupport = FALSE;
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/mmixer.c [iso-8859-1] Sun May 11
23:11:16 2014
@@ -202,7 +202,7 @@
PFILE_OBJECT FileObject;
/* get file object */
- Status = ObReferenceObjectByHandle(hMixer, GENERIC_READ | GENERIC_WRITE,
IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(hMixer, GENERIC_READ | GENERIC_WRITE,
*IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT("failed to reference %p with %lx\n", hMixer, Status);
@@ -420,7 +420,7 @@
if (DeviceInfo->u.hNotifyEvent)
{
- Status = ObReferenceObjectByHandle(DeviceInfo->u.hNotifyEvent,
EVENT_MODIFY_STATE, ExEventObjectType, UserMode, (LPVOID*)&EventObject, NULL);
+ Status = ObReferenceObjectByHandle(DeviceInfo->u.hNotifyEvent,
EVENT_MODIFY_STATE, *ExEventObjectType, UserMode, (LPVOID*)&EventObject, NULL);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/drivers/wdm/audio/legacy/wdmaud/sup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/legacy/w…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/legacy/wdmaud/sup.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/legacy/wdmaud/sup.c [iso-8859-1] Sun May 11 23:11:16
2014
@@ -420,7 +420,7 @@
if (FileObject)
{
- Status = ObReferenceObjectByHandle(hDevice, FILE_READ_DATA | FILE_WRITE_DATA,
IoFileObjectType, KernelMode, (PVOID*)FileObject, NULL);
+ Status = ObReferenceObjectByHandle(hDevice, FILE_READ_DATA | FILE_WRITE_DATA,
*IoFileObjectType, KernelMode, (PVOID*)FileObject, NULL);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/drivers/wdm/audio/sysaudio/deviface.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/sysaudio/deviface.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/sysaudio/deviface.c [iso-8859-1] Sun May 11 23:11:16
2014
@@ -50,7 +50,7 @@
return Status;
}
- Status = ObReferenceObjectByHandle(NodeHandle, GENERIC_READ | GENERIC_WRITE,
IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(NodeHandle, GENERIC_READ | GENERIC_WRITE,
*IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
ZwClose(NodeHandle);
Modified: trunk/reactos/drivers/wdm/audio/sysaudio/pin.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/wdm/audio/sysaudio…
==============================================================================
--- trunk/reactos/drivers/wdm/audio/sysaudio/pin.c [iso-8859-1] (original)
+++ trunk/reactos/drivers/wdm/audio/sysaudio/pin.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -35,7 +35,7 @@
ASSERT(Context);
/* acquire real pin file object */
- Status = ObReferenceObjectByHandle(Context->Handle, GENERIC_WRITE,
IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(Context->Handle, GENERIC_WRITE,
*IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
Irp->IoStatus.Information = 0;
@@ -94,7 +94,7 @@
}
/* acquire real pin file object */
- Status = ObReferenceObjectByHandle(Context->Handle, GENERIC_WRITE,
IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
+ Status = ObReferenceObjectByHandle(Context->Handle, GENERIC_WRITE,
*IoFileObjectType, KernelMode, (PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
DPRINT1("failed\n");
@@ -235,8 +235,8 @@
}
Status = ObReferenceObjectByHandle(PinHandle,
- GENERIC_READ | GENERIC_WRITE,
- IoFileObjectType, KernelMode,
(PVOID*)&FileObject, NULL);
+ GENERIC_READ | GENERIC_WRITE,
+ *IoFileObjectType, KernelMode,
(PVOID*)&FileObject, NULL);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/include/ddk/ntddk.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntddk.h?rev=63…
==============================================================================
--- trunk/reactos/include/ddk/ntddk.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntddk.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -1666,14 +1666,12 @@
#endif
} HAL_DISPATCH, *PHAL_DISPATCH;
-/* GCC/MSVC and WDK compatible declaration */
-extern NTKERNELAPI HAL_DISPATCH HalDispatchTable;
-
-#if defined(_NTOSKRNL_) || defined(_BLDR_)
+#ifdef _NTSYSTEM_
+extern HAL_DISPATCH HalDispatchTable;
#define HALDISPATCH (&HalDispatchTable)
#else
-/* This is a WDK compatibility definition */
-#define HalDispatchTable (&HalDispatchTable)
+extern PHAL_DISPATCH HalDispatchTable;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(HalDispatchTable)
#define HALDISPATCH HalDispatchTable
#endif
Modified: trunk/reactos/include/ddk/ntifs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/ntifs.h?rev=63…
==============================================================================
--- trunk/reactos/include/ddk/ntifs.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/ntifs.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -870,11 +870,11 @@
(NTAPI *PRTL_FREE_STRING_ROUTINE)(
_In_ __drv_freesMem(Mem) _Post_invalid_ PVOID Buffer);
-extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
-extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
+extern NTKERNELAPI const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
+extern NTKERNELAPI const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
#if _WIN32_WINNT >= 0x0600
-extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
+extern NTKERNELAPI const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
#endif
_Function_class_(RTL_HEAP_COMMIT_ROUTINE)
@@ -4937,35 +4937,13 @@
_In_ BOOLEAN SafeToRecurse);
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
-#define DO_VERIFY_VOLUME 0x00000002
-#define DO_BUFFERED_IO 0x00000004
-#define DO_EXCLUSIVE 0x00000008
-#define DO_DIRECT_IO 0x00000010
-#define DO_MAP_IO_BUFFER 0x00000020
-#define DO_DEVICE_HAS_NAME 0x00000040
-#define DO_DEVICE_INITIALIZING 0x00000080
-#define DO_SYSTEM_BOOT_PARTITION 0x00000100
-#define DO_LONG_TERM_REQUESTS 0x00000200
-#define DO_NEVER_LAST_DEVICE 0x00000400
-#define DO_SHUTDOWN_REGISTERED 0x00000800
-#define DO_BUS_ENUMERATED_DEVICE 0x00001000
-#define DO_POWER_PAGABLE 0x00002000
-#define DO_POWER_INRUSH 0x00004000
-#define DO_LOW_PRIORITY_FILESYSTEM 0x00010000
-#define DO_SUPPORTS_TRANSACTIONS 0x00040000
-#define DO_FORCE_NEITHER_IO 0x00080000
-#define DO_VOLUME_DEVICE_OBJECT 0x00100000
-#define DO_SYSTEM_SYSTEM_PARTITION 0x00200000
-#define DO_SYSTEM_CRITICAL_PARTITION 0x00400000
-#define DO_DISALLOW_EXECUTE 0x00800000
-
-extern KSPIN_LOCK IoStatisticsLock;
-extern ULONG IoReadOperationCount;
-extern ULONG IoWriteOperationCount;
-extern ULONG IoOtherOperationCount;
-extern LARGE_INTEGER IoReadTransferCount;
-extern LARGE_INTEGER IoWriteTransferCount;
-extern LARGE_INTEGER IoOtherTransferCount;
+extern NTKERNELAPI KSPIN_LOCK IoStatisticsLock;
+extern NTKERNELAPI ULONG IoReadOperationCount;
+extern NTKERNELAPI ULONG IoWriteOperationCount;
+extern NTKERNELAPI ULONG IoOtherOperationCount;
+extern NTKERNELAPI LARGE_INTEGER IoReadTransferCount;
+extern NTKERNELAPI LARGE_INTEGER IoWriteTransferCount;
+extern NTKERNELAPI LARGE_INTEGER IoOtherTransferCount;
#define IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE 64
#define IO_FILE_OBJECT_PAGED_POOL_CHARGE 1024
@@ -5731,6 +5709,7 @@
((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->PrimaryToken )
extern NTKERNELAPI PSE_EXPORTS SeExports;
+
/******************************************************************************
* Process Manager Functions *
******************************************************************************/
@@ -8413,26 +8392,31 @@
(InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\
}
-/* GCC compatible definition, MS one is retarded */
-extern NTKERNELAPI const UCHAR * const FsRtlLegalAnsiCharacterArray;
-#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
+#ifdef _NTSYSTEM_
+extern const UCHAR * const FsRtlLegalAnsiCharacterArray;
+#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
+#else
+extern const UCHAR * const *FsRtlLegalAnsiCharacterArray;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(FsRtlLegalAnsiCharacterArray)
+#define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray)
+#endif
#define FsRtlIsAnsiCharacterWild(C) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \
)
#define FsRtlIsAnsiCharacterLegalFat(C, WILD) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
)
#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
)
#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
)
@@ -8460,7 +8444,7 @@
#define FsRtlIsUnicodeCharacterWild(C) ( \
(((C) >= 0x40) ? \
FALSE : \
- FlagOn(FsRtlLegalAnsiCharacterArray[(C)], FSRTL_WILD_CHARACTER )) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )) \
)
#define FsRtlInitPerFileContext( _fc, _owner, _inst, _cb) \
@@ -8623,7 +8607,7 @@
(((PSECTION_OBJECT_POINTERS)(FO)->SectionObjectPointer)->SharedCacheMap !=
NULL) \
)
-extern ULONG CcFastMdlReadWait;
+extern NTKERNELAPI ULONG CcFastMdlReadWait;
#if (NTDDI_VERSION >= NTDDI_WIN2K)
@@ -11005,13 +10989,14 @@
#define HalGetDmaAlignmentRequirement() 1L
#endif
-extern NTKERNELAPI PUSHORT NlsOemLeadByteInfo;
-#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
-
-#ifdef NLS_MB_CODE_PAGE_TAG
-#undef NLS_MB_CODE_PAGE_TAG
+#ifdef _NTSYSTEM_
+extern PUSHORT NlsOemLeadByteInfo;
+#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
+#else
+extern PUSHORT *NlsOemLeadByteInfo;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsOemLeadByteInfo)
+#define NLS_OEM_LEAD_BYTE_INFO (*NlsOemLeadByteInfo)
#endif
-#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
#if (NTDDI_VERSION >= NTDDI_VISTA)
Modified: trunk/reactos/include/ddk/wdm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ddk/wdm.h?rev=6324…
==============================================================================
--- trunk/reactos/include/ddk/wdm.h [iso-8859-1] (original)
+++ trunk/reactos/include/ddk/wdm.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -25,6 +25,9 @@
#ifndef _WDMDDK_
#define _WDMDDK_
+// TEMP HACK!
+#define _PROPER_NT_EXPORTS 1
+
#define WDM_MAJORVERSION 0x06
#define WDM_MINORVERSION 0x00
@@ -82,10 +85,13 @@
#endif
/* For ReactOS */
-#if !defined(_NTOSKRNL_) && !defined(_BLDR_)
+#if !defined(_NTOSKRNL_) && !defined(_BLDR_) && !defined(_NTSYSTEM_)
#define NTKERNELAPI DECLSPEC_IMPORT
#else
#define NTKERNELAPI
+#ifndef _NTSYSTEM_
+#define _NTSYSTEM_
+#endif
#endif
#if defined(_X86_) && !defined(_NTHAL_)
@@ -129,6 +135,29 @@
#define ALLOC_DATA_PRAGMA 1
#endif
+#endif /* _MSC_VER */
+
+/* These macros are used to create aliases for imported data. We need to do
+ this to have declarations that are compatible with MS DDK */
+#ifdef _M_IX86
+#define __SYMBOL(_Name) "_"#_Name
+#define __IMPORTSYMBOL(_Name) "__imp__"#_Name
+#define __IMPORTNAME(_Name) _imp__##_Name
+#else
+#define __SYMBOL(_Name) #_Name
+#define __IMPORTSYMBOL(_Name) "__imp_"#_Name
+#define __IMPORTNAME(_Name) __imp_##_Name
+#endif
+#ifdef _MSC_VER
+#define __CREATE_NTOS_DATA_IMPORT_ALIAS(_Name) \
+ __pragma(comment(linker, "/alternatename:"__SYMBOL(_Name) "="
__IMPORTSYMBOL(_Name)))
+#else /* !_MSC_VER */
+#ifndef __STRINGIFY
+#define __STRINGIFY(_exp) #_exp
+#endif
+#define _Pragma_redifine_extname(_Name, _Target) _Pragma(__STRINGIFY(redefine_extname
_Name _Target))
+#define __CREATE_NTOS_DATA_IMPORT_ALIAS(_Name) \
+ _Pragma_redifine_extname(_Name,__IMPORTNAME(_Name))
#endif
#if defined(_WIN64)
@@ -599,11 +628,19 @@
PCONTEXT ContextRecord;
} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
-/* MS definition is broken! */
-extern BOOLEAN NTSYSAPI NlsMbCodePageTag;
-extern BOOLEAN NTSYSAPI NlsMbOemCodePageTag;
+#ifdef _NTSYSTEM_
+extern BOOLEAN NlsMbCodePageTag;
#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
+extern BOOLEAN NlsMbOemCodePageTag;
#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
+#else
+extern BOOLEAN *NlsMbCodePageTag;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsMbCodePageTag)
+#define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
+extern BOOLEAN *NlsMbOemCodePageTag;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsMbOemCodePageTag)
+#define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
+#endif
#define SHORT_LEAST_SIGNIFICANT_BIT 0
#define SHORT_MOST_SIGNIFICANT_BIT 1
@@ -1673,6 +1710,7 @@
extern NTSYSAPI CCHAR KeNumberProcessors;
#else
extern PCCHAR KeNumberProcessors;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(KeNumberProcessors)
#endif
@@ -1824,8 +1862,11 @@
MmLargeSystem
} MM_SYSTEMSIZE;
-extern NTKERNELAPI BOOLEAN Mm64BitPhysicalAddress;
-extern PVOID MmBadPointer;
+#ifndef _NTSYSTEM_
+extern PBOOLEAN Mm64BitPhysicalAddress;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(Mm64BitPhysicalAddress)
+#endif
+extern NTKERNELAPI PVOID MmBadPointer;
/******************************************************************************
@@ -2098,7 +2139,7 @@
/* Global debug flag */
#if DEVL
-extern ULONG NtGlobalFlag;
+extern NTKERNELAPI ULONG NtGlobalFlag;
#define IF_NTOS_DEBUG(FlagName) if (NtGlobalFlag & (FLG_##FlagName))
#else
#define IF_NTOS_DEBUG(FlagName) if(FALSE)
@@ -7857,6 +7898,7 @@
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
/* Exported object types */
+#ifdef _NTSYSTEM_
extern POBJECT_TYPE NTSYSAPI CmKeyObjectType;
extern POBJECT_TYPE NTSYSAPI ExEventObjectType;
extern POBJECT_TYPE NTSYSAPI ExSemaphoreObjectType;
@@ -7864,6 +7906,30 @@
extern POBJECT_TYPE NTSYSAPI PsThreadType;
extern POBJECT_TYPE NTSYSAPI SeTokenObjectType;
extern POBJECT_TYPE NTSYSAPI PsProcessType;
+#else
+extern POBJECT_TYPE *CmKeyObjectType;
+extern POBJECT_TYPE *IoFileObjectType;
+extern POBJECT_TYPE *ExEventObjectType;
+extern POBJECT_TYPE *ExSemaphoreObjectType;
+extern POBJECT_TYPE *TmTransactionManagerObjectType;
+extern POBJECT_TYPE *TmResourceManagerObjectType;
+extern POBJECT_TYPE *TmEnlistmentObjectType;
+extern POBJECT_TYPE *TmTransactionObjectType;
+extern POBJECT_TYPE *PsProcessType;
+extern POBJECT_TYPE *PsThreadType;
+extern POBJECT_TYPE *SeTokenObjectType;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(CmKeyObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(IoFileObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(ExEventObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(ExSemaphoreObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmTransactionManagerObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmResourceManagerObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmEnlistmentObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmTransactionObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(PsProcessType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(PsThreadType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(SeTokenObjectType)
+#endif
/******************************************************************************
@@ -8339,7 +8405,7 @@
#define HIGH_LEVEL 15
#define KI_USER_SHARED_DATA ((ULONG_PTR)(KADDRESS_BASE + 0xFFFE0000))
-extern volatile LARGE_INTEGER KeTickCount;
+extern NTKERNELAPI volatile LARGE_INTEGER KeTickCount;
#define PAUSE_PROCESSOR __yield();
@@ -15770,27 +15836,18 @@
#endif /* !DBG */
-#if defined(__GNUC__)
-
-extern NTKERNELAPI BOOLEAN KdDebuggerNotPresent;
-extern NTKERNELAPI BOOLEAN KdDebuggerEnabled;
-#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
-#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
-
-#elif defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || defined(_WDMDDK_) ||
defined(_NTOSP_)
-
-extern NTKERNELAPI PBOOLEAN KdDebuggerNotPresent;
-extern NTKERNELAPI PBOOLEAN KdDebuggerEnabled;
-#define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
-#define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
-
-#else
-
-extern BOOLEAN KdDebuggerNotPresent;
+#ifdef _NTSYSTEM_
extern BOOLEAN KdDebuggerEnabled;
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
+extern BOOLEAN KdDebuggerNotPresent;
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
-
+#else
+extern BOOLEAN *KdDebuggerEnabled;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerEnabled)
+#define KD_DEBUGGER_ENABLED (*KdDebuggerEnabled)
+extern BOOLEAN *KdDebuggerNotPresent;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerNotPresent)
+#define KD_DEBUGGER_NOT_PRESENT (*KdDebuggerNotPresent)
#endif
#if (NTDDI_VERSION >= NTDDI_WIN2K)
Modified: trunk/reactos/include/reactos/libs/pseh/pseh3.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/libs/pseh/…
==============================================================================
--- trunk/reactos/include/reactos/libs/pseh/pseh3.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/libs/pseh/pseh3.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -120,7 +120,7 @@
#define _SEH3$_EnforceFramePointer() asm volatile ("#\n" : :
"m"(*(char*)__builtin_alloca(4)) : "%esp", "memory")
/* CLANG doesn't have asm goto! */
-#define _SEH3$_ASM_GOTO(_Label, ...)
+#define _SEH3$_ASM_GOTO(...)
int
__attribute__((regparm(3)))
@@ -167,7 +167,7 @@
/* This will make GCC use ebp, even if it was disabled by -fomit-frame-pointer */
#define _SEH3$_EnforceFramePointer() asm volatile ("#\n" : :
"m"(*(char*)__builtin_alloca(0)) : "%esp", "memory")
-#define _SEH3$_ASM_GOTO(_Label, ...) asm goto ("#\n" : : : "memory",
## __VA_ARGS__ : _Label)
+#define _SEH3$_ASM_GOTO(...) asm goto ("#\n" : : : "memory" :
__VA_ARGS__)
#ifdef __cplusplus
#define _SEH3$_CALL_WRAPPER(_Function, _TrylevelFrame, _DataTable) \
@@ -177,7 +177,7 @@
: \
: "m" (*(_TrylevelFrame)), "m" (*(_DataTable)),
"c"(__builtin_alloca(0)) \
: "eax", "edx", "memory" \
- : _SEH3$_l_HandlerTarget, _SEH3$_l_FilterOrFinally)
+ : _SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException,
_SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally)
#else
#define _SEH3$_CALL_WRAPPER(_Function, _TrylevelFrame, _DataTable) \
@@ -187,7 +187,7 @@
: \
: "m" (*(_TrylevelFrame)), "m" (*(_DataTable)) \
: "eax", "edx", "ecx", "memory" \
- : _SEH3$_l_HandlerTarget)
+ : _SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException,
_SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally)
#endif
/* This is an asm wrapper around _SEH3$_RegisterFrame */
@@ -202,10 +202,8 @@
around into places that are never executed. */
#define _SEH3$_SCARE_GCC() \
void *plabel; \
- _SEH3$_ASM_GOTO(_SEH3$_l_BeforeTry); \
- _SEH3$_ASM_GOTO(_SEH3$_l_HandlerTarget); \
- _SEH3$_ASM_GOTO(_SEH3$_l_OnException); \
- asm volatile ("#" : "=a"(plabel) :
"p"(&&_SEH3$_l_BeforeTry),
"p"(&&_SEH3$_l_HandlerTarget),
"p"(&&_SEH3$_l_OnException) \
+ _SEH3$_ASM_GOTO(_SEH3$_l_BeforeTry, _SEH3$_l_HandlerTarget, _SEH3$_l_OnException,
_SEH3$_l_BeforeFilterOrFinally, _SEH3$_l_FilterOrFinally); \
+ asm volatile ("#" : "=a"(plabel) :
"p"(&&_SEH3$_l_BeforeTry),
"p"(&&_SEH3$_l_HandlerTarget),
"p"(&&_SEH3$_l_OnException),
"p"(&&_SEH3$_l_FilterOrFinally) \
: "ebx", "ecx", "edx",
"esi", "edi", "flags", "memory" ); \
goto _SEH3$_l_OnException;
Modified: trunk/reactos/include/xdk/ccfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ccfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/ccfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/ccfuncs.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -6,7 +6,7 @@
(((PSECTION_OBJECT_POINTERS)(FO)->SectionObjectPointer)->SharedCacheMap !=
NULL) \
)
-extern ULONG CcFastMdlReadWait;
+extern NTKERNELAPI ULONG CcFastMdlReadWait;
#if (NTDDI_VERSION >= NTDDI_WIN2K)
Modified: trunk/reactos/include/xdk/extypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/extypes.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/extypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/extypes.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -271,7 +271,7 @@
/* Global debug flag */
#if DEVL
-extern ULONG NtGlobalFlag;
+extern NTKERNELAPI ULONG NtGlobalFlag;
#define IF_NTOS_DEBUG(FlagName) if (NtGlobalFlag & (FLG_##FlagName))
#else
#define IF_NTOS_DEBUG(FlagName) if(FALSE)
Modified: trunk/reactos/include/xdk/fsrtlfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/fsrtlfuncs.h?r…
==============================================================================
--- trunk/reactos/include/xdk/fsrtlfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/fsrtlfuncs.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -1580,26 +1580,31 @@
(InterlockedDecrement((LONG volatile *)&((FL)->LockRequestsInProgress)));\
}
-/* GCC compatible definition, MS one is retarded */
-extern NTKERNELAPI const UCHAR * const FsRtlLegalAnsiCharacterArray;
-#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
+#ifdef _NTSYSTEM_
+extern const UCHAR * const FsRtlLegalAnsiCharacterArray;
+#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
+#else
+extern const UCHAR * const *FsRtlLegalAnsiCharacterArray;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(FsRtlLegalAnsiCharacterArray)
+#define LEGAL_ANSI_CHARACTER_ARRAY (*FsRtlLegalAnsiCharacterArray)
+#endif
#define FsRtlIsAnsiCharacterWild(C) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], FSRTL_WILD_CHARACTER ) \
)
#define FsRtlIsAnsiCharacterLegalFat(C, WILD) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_FAT_LEGAL) | \
((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
)
#define FsRtlIsAnsiCharacterLegalHpfs(C, WILD) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_HPFS_LEGAL) | \
((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
)
#define FsRtlIsAnsiCharacterLegalNtfs(C, WILD) ( \
- FlagOn(FsRtlLegalAnsiCharacterArray[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(UCHAR)(C)], (FSRTL_NTFS_LEGAL) | \
((WILD) ? FSRTL_WILD_CHARACTER : 0 )) \
)
@@ -1627,7 +1632,7 @@
#define FsRtlIsUnicodeCharacterWild(C) ( \
(((C) >= 0x40) ? \
FALSE : \
- FlagOn(FsRtlLegalAnsiCharacterArray[(C)], FSRTL_WILD_CHARACTER )) \
+ FlagOn(LEGAL_ANSI_CHARACTER_ARRAY[(C)], FSRTL_WILD_CHARACTER )) \
)
#define FsRtlInitPerFileContext( _fc, _owner, _inst, _cb) \
Modified: trunk/reactos/include/xdk/haltypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/haltypes.h?rev…
==============================================================================
--- trunk/reactos/include/xdk/haltypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/haltypes.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -269,14 +269,12 @@
#endif
} HAL_DISPATCH, *PHAL_DISPATCH;
-/* GCC/MSVC and WDK compatible declaration */
-extern NTKERNELAPI HAL_DISPATCH HalDispatchTable;
-
-#if defined(_NTOSKRNL_) || defined(_BLDR_)
+#ifdef _NTSYSTEM_
+extern HAL_DISPATCH HalDispatchTable;
#define HALDISPATCH (&HalDispatchTable)
#else
-/* This is a WDK compatibility definition */
-#define HalDispatchTable (&HalDispatchTable)
+extern PHAL_DISPATCH HalDispatchTable;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(HalDispatchTable)
#define HALDISPATCH HalDispatchTable
#endif
Modified: trunk/reactos/include/xdk/ia64/ke.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ia64/ke.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/ia64/ke.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/ia64/ke.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -17,7 +17,7 @@
#define HIGH_LEVEL 15
#define KI_USER_SHARED_DATA ((ULONG_PTR)(KADDRESS_BASE + 0xFFFE0000))
-extern volatile LARGE_INTEGER KeTickCount;
+extern NTKERNELAPI volatile LARGE_INTEGER KeTickCount;
#define PAUSE_PROCESSOR __yield();
Modified: trunk/reactos/include/xdk/iotypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/iotypes.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/iotypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/iotypes.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -7037,35 +7037,13 @@
_In_ BOOLEAN SafeToRecurse);
#endif /* (NTDDI_VERSION >= NTDDI_VISTA) */
-#define DO_VERIFY_VOLUME 0x00000002
-#define DO_BUFFERED_IO 0x00000004
-#define DO_EXCLUSIVE 0x00000008
-#define DO_DIRECT_IO 0x00000010
-#define DO_MAP_IO_BUFFER 0x00000020
-#define DO_DEVICE_HAS_NAME 0x00000040
-#define DO_DEVICE_INITIALIZING 0x00000080
-#define DO_SYSTEM_BOOT_PARTITION 0x00000100
-#define DO_LONG_TERM_REQUESTS 0x00000200
-#define DO_NEVER_LAST_DEVICE 0x00000400
-#define DO_SHUTDOWN_REGISTERED 0x00000800
-#define DO_BUS_ENUMERATED_DEVICE 0x00001000
-#define DO_POWER_PAGABLE 0x00002000
-#define DO_POWER_INRUSH 0x00004000
-#define DO_LOW_PRIORITY_FILESYSTEM 0x00010000
-#define DO_SUPPORTS_TRANSACTIONS 0x00040000
-#define DO_FORCE_NEITHER_IO 0x00080000
-#define DO_VOLUME_DEVICE_OBJECT 0x00100000
-#define DO_SYSTEM_SYSTEM_PARTITION 0x00200000
-#define DO_SYSTEM_CRITICAL_PARTITION 0x00400000
-#define DO_DISALLOW_EXECUTE 0x00800000
-
-extern KSPIN_LOCK IoStatisticsLock;
-extern ULONG IoReadOperationCount;
-extern ULONG IoWriteOperationCount;
-extern ULONG IoOtherOperationCount;
-extern LARGE_INTEGER IoReadTransferCount;
-extern LARGE_INTEGER IoWriteTransferCount;
-extern LARGE_INTEGER IoOtherTransferCount;
+extern NTKERNELAPI KSPIN_LOCK IoStatisticsLock;
+extern NTKERNELAPI ULONG IoReadOperationCount;
+extern NTKERNELAPI ULONG IoWriteOperationCount;
+extern NTKERNELAPI ULONG IoOtherOperationCount;
+extern NTKERNELAPI LARGE_INTEGER IoReadTransferCount;
+extern NTKERNELAPI LARGE_INTEGER IoWriteTransferCount;
+extern NTKERNELAPI LARGE_INTEGER IoOtherTransferCount;
#define IO_FILE_OBJECT_NON_PAGED_POOL_CHARGE 64
#define IO_FILE_OBJECT_PAGED_POOL_CHARGE 1024
Modified: trunk/reactos/include/xdk/kdfuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/kdfuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/kdfuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/kdfuncs.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -119,27 +119,18 @@
#endif /* !DBG */
-#if defined(__GNUC__)
-
-extern NTKERNELAPI BOOLEAN KdDebuggerNotPresent;
-extern NTKERNELAPI BOOLEAN KdDebuggerEnabled;
-#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
-#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
-
-#elif defined(_NTDDK_) || defined(_NTIFS_) || defined(_NTHAL_) || defined(_WDMDDK_) ||
defined(_NTOSP_)
-
-extern NTKERNELAPI PBOOLEAN KdDebuggerNotPresent;
-extern NTKERNELAPI PBOOLEAN KdDebuggerEnabled;
-#define KD_DEBUGGER_ENABLED *KdDebuggerEnabled
-#define KD_DEBUGGER_NOT_PRESENT *KdDebuggerNotPresent
-
-#else
-
-extern BOOLEAN KdDebuggerNotPresent;
+#ifdef _NTSYSTEM_
extern BOOLEAN KdDebuggerEnabled;
#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
+extern BOOLEAN KdDebuggerNotPresent;
#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
-
+#else
+extern BOOLEAN *KdDebuggerEnabled;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerEnabled)
+#define KD_DEBUGGER_ENABLED (*KdDebuggerEnabled)
+extern BOOLEAN *KdDebuggerNotPresent;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(KdDebuggerNotPresent)
+#define KD_DEBUGGER_NOT_PRESENT (*KdDebuggerNotPresent)
#endif
#if (NTDDI_VERSION >= NTDDI_WIN2K)
Modified: trunk/reactos/include/xdk/ketypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ketypes.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/ketypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/ketypes.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -987,6 +987,7 @@
extern NTSYSAPI CCHAR KeNumberProcessors;
#else
extern PCCHAR KeNumberProcessors;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(KeNumberProcessors)
#endif
$endif (_WDMDDK_)
Modified: trunk/reactos/include/xdk/mmtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/mmtypes.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/mmtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/mmtypes.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -147,8 +147,11 @@
MmLargeSystem
} MM_SYSTEMSIZE;
-extern NTKERNELAPI BOOLEAN Mm64BitPhysicalAddress;
-extern PVOID MmBadPointer;
+#ifndef _NTSYSTEM_
+extern PBOOLEAN Mm64BitPhysicalAddress;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(Mm64BitPhysicalAddress)
+#endif
+extern NTKERNELAPI PVOID MmBadPointer;
$endif (_WDMDDK_)
$if (_NTDDK_)
Modified: trunk/reactos/include/xdk/ntifs.template.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/ntifs.template…
==============================================================================
--- trunk/reactos/include/xdk/ntifs.template.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/ntifs.template.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -1124,13 +1124,14 @@
#define HalGetDmaAlignmentRequirement() 1L
#endif
-extern NTKERNELAPI PUSHORT NlsOemLeadByteInfo;
-#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
-
-#ifdef NLS_MB_CODE_PAGE_TAG
-#undef NLS_MB_CODE_PAGE_TAG
-#endif
-#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
+#ifdef _NTSYSTEM_
+extern PUSHORT NlsOemLeadByteInfo;
+#define NLS_OEM_LEAD_BYTE_INFO NlsOemLeadByteInfo
+#else
+extern PUSHORT *NlsOemLeadByteInfo;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsOemLeadByteInfo)
+#define NLS_OEM_LEAD_BYTE_INFO (*NlsOemLeadByteInfo)
+#endif
#if (NTDDI_VERSION >= NTDDI_VISTA)
Modified: trunk/reactos/include/xdk/obtypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/obtypes.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/obtypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/obtypes.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -125,6 +125,7 @@
} OBJECT_NAME_INFORMATION, *POBJECT_NAME_INFORMATION;
/* Exported object types */
+#ifdef _NTSYSTEM_
extern POBJECT_TYPE NTSYSAPI CmKeyObjectType;
extern POBJECT_TYPE NTSYSAPI ExEventObjectType;
extern POBJECT_TYPE NTSYSAPI ExSemaphoreObjectType;
@@ -132,6 +133,30 @@
extern POBJECT_TYPE NTSYSAPI PsThreadType;
extern POBJECT_TYPE NTSYSAPI SeTokenObjectType;
extern POBJECT_TYPE NTSYSAPI PsProcessType;
+#else
+extern POBJECT_TYPE *CmKeyObjectType;
+extern POBJECT_TYPE *IoFileObjectType;
+extern POBJECT_TYPE *ExEventObjectType;
+extern POBJECT_TYPE *ExSemaphoreObjectType;
+extern POBJECT_TYPE *TmTransactionManagerObjectType;
+extern POBJECT_TYPE *TmResourceManagerObjectType;
+extern POBJECT_TYPE *TmEnlistmentObjectType;
+extern POBJECT_TYPE *TmTransactionObjectType;
+extern POBJECT_TYPE *PsProcessType;
+extern POBJECT_TYPE *PsThreadType;
+extern POBJECT_TYPE *SeTokenObjectType;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(CmKeyObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(IoFileObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(ExEventObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(ExSemaphoreObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmTransactionManagerObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmResourceManagerObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmEnlistmentObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(TmTransactionObjectType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(PsProcessType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(PsThreadType)
+__CREATE_NTOS_DATA_IMPORT_ALIAS(SeTokenObjectType)
+#endif
$endif (_WDMDDK_)
$if (_NTIFS_)
Modified: trunk/reactos/include/xdk/rtltypes.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/rtltypes.h?rev…
==============================================================================
--- trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/rtltypes.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -197,11 +197,19 @@
PCONTEXT ContextRecord;
} EXCEPTION_POINTERS, *PEXCEPTION_POINTERS;
-/* MS definition is broken! */
-extern BOOLEAN NTSYSAPI NlsMbCodePageTag;
-extern BOOLEAN NTSYSAPI NlsMbOemCodePageTag;
+#ifdef _NTSYSTEM_
+extern BOOLEAN NlsMbCodePageTag;
#define NLS_MB_CODE_PAGE_TAG NlsMbCodePageTag
+extern BOOLEAN NlsMbOemCodePageTag;
#define NLS_MB_OEM_CODE_PAGE_TAG NlsMbOemCodePageTag
+#else
+extern BOOLEAN *NlsMbCodePageTag;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsMbCodePageTag)
+#define NLS_MB_CODE_PAGE_TAG (*NlsMbCodePageTag)
+extern BOOLEAN *NlsMbOemCodePageTag;
+__CREATE_NTOS_DATA_IMPORT_ALIAS(NlsMbOemCodePageTag)
+#define NLS_MB_OEM_CODE_PAGE_TAG (*NlsMbOemCodePageTag)
+#endif
#define SHORT_LEAST_SIGNIFICANT_BIT 0
#define SHORT_MOST_SIGNIFICANT_BIT 1
@@ -551,11 +559,11 @@
(NTAPI *PRTL_FREE_STRING_ROUTINE)(
_In_ __drv_freesMem(Mem) _Post_invalid_ PVOID Buffer);
-extern const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
-extern const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
+extern NTKERNELAPI const PRTL_ALLOCATE_STRING_ROUTINE RtlAllocateStringRoutine;
+extern NTKERNELAPI const PRTL_FREE_STRING_ROUTINE RtlFreeStringRoutine;
#if _WIN32_WINNT >= 0x0600
-extern const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
+extern NTKERNELAPI const PRTL_REALLOCATE_STRING_ROUTINE RtlReallocateStringRoutine;
#endif
_Function_class_(RTL_HEAP_COMMIT_ROUTINE)
Modified: trunk/reactos/include/xdk/sefuncs.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/sefuncs.h?rev=…
==============================================================================
--- trunk/reactos/include/xdk/sefuncs.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/sefuncs.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -588,4 +588,5 @@
((PSECURITY_SUBJECT_CONTEXT) SubjectContext)->PrimaryToken )
extern NTKERNELAPI PSE_EXPORTS SeExports;
+
$endif (_NTIFS_)
Modified: trunk/reactos/include/xdk/wdm.template.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/xdk/wdm.template.h…
==============================================================================
--- trunk/reactos/include/xdk/wdm.template.h [iso-8859-1] (original)
+++ trunk/reactos/include/xdk/wdm.template.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -82,10 +82,13 @@
#endif
/* For ReactOS */
-#if !defined(_NTOSKRNL_) && !defined(_BLDR_)
+#if !defined(_NTOSKRNL_) && !defined(_BLDR_) && !defined(_NTSYSTEM_)
#define NTKERNELAPI DECLSPEC_IMPORT
#else
#define NTKERNELAPI
+#ifndef _NTSYSTEM_
+#define _NTSYSTEM_
+#endif
#endif
#if defined(_X86_) && !defined(_NTHAL_)
@@ -129,6 +132,29 @@
#define ALLOC_DATA_PRAGMA 1
#endif
+#endif /* _MSC_VER */
+
+/* These macros are used to create aliases for imported data. We need to do
+ this to have declarations that are compatible with MS DDK */
+#ifdef _M_IX86
+#define __SYMBOL(_Name) "_"#_Name
+#define __IMPORTSYMBOL(_Name) "__imp__"#_Name
+#define __IMPORTNAME(_Name) _imp__##_Name
+#else
+#define __SYMBOL(_Name) #_Name
+#define __IMPORTSYMBOL(_Name) "__imp_"#_Name
+#define __IMPORTNAME(_Name) __imp_##_Name
+#endif
+#ifdef _MSC_VER
+#define __CREATE_NTOS_DATA_IMPORT_ALIAS(_Name) \
+ __pragma(comment(linker, "/alternatename:"__SYMBOL(_Name) "="
__IMPORTSYMBOL(_Name)))
+#else /* !_MSC_VER */
+#ifndef __STRINGIFY
+#define __STRINGIFY(_exp) #_exp
+#endif
+#define _Pragma_redifine_extname(_Name, _Target) _Pragma(__STRINGIFY(redefine_extname
_Name _Target))
+#define __CREATE_NTOS_DATA_IMPORT_ALIAS(_Name) \
+ _Pragma_redifine_extname(_Name,__IMPORTNAME(_Name))
#endif
#if defined(_WIN64)
Modified: trunk/reactos/lib/rtl/nls.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/nls.c?rev=63247&am…
==============================================================================
--- trunk/reactos/lib/rtl/nls.c [iso-8859-1] (original)
+++ trunk/reactos/lib/rtl/nls.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -31,13 +31,12 @@
PWCHAR NlsOemToUnicodeTable = NULL;
PCHAR NlsUnicodeToOemTable =NULL;
PWCHAR NlsDbcsUnicodeToOemTable = NULL;
-PUSHORT _NlsOemLeadByteInfo = NULL; /* exported */
+PUSHORT NlsOemLeadByteInfo = NULL; /* exported */
USHORT NlsOemDefaultChar = '\0';
USHORT NlsUnicodeDefaultChar = 0;
-#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
#define INIT_FUNCTION
/* FUNCTIONS *****************************************************************/
Modified: trunk/reactos/ntoskrnl/ex/event.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/event.c?rev=63…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/event.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/event.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -19,7 +19,7 @@
/* GLOBALS *******************************************************************/
-POBJECT_TYPE _ExEventObjectType = NULL;
+POBJECT_TYPE ExEventObjectType = NULL;
GENERIC_MAPPING ExpEventMapping =
{
Modified: trunk/reactos/ntoskrnl/ex/sem.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/sem.c?rev=6324…
==============================================================================
--- trunk/reactos/ntoskrnl/ex/sem.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/sem.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -19,7 +19,7 @@
/* GLOBALS ******************************************************************/
-POBJECT_TYPE _ExSemaphoreObjectType;
+POBJECT_TYPE ExSemaphoreObjectType;
GENERIC_MAPPING ExSemaphoreMapping =
{
Modified: trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/fsrtl/fsrtlpc.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -18,7 +18,7 @@
ULONG FsRtlPagingIoResourceSelector;
NTSTATUS NTAPI INIT_FUNCTION FsRtlInitializeWorkerThread(VOID);
-static UCHAR LegalAnsiCharacterArray[] =
+static const UCHAR LegalAnsiCharacterArray[] =
{
0, /* CTRL+@, 0x00 */
0, /* CTRL+A, 0x01 */
@@ -150,7 +150,7 @@
FSRTL_FAT_LEGAL | FSRTL_HPFS_LEGAL | FSRTL_NTFS_LEGAL /* 0x7f */
};
-PUCHAR FsRtlLegalAnsiCharacterArray = LegalAnsiCharacterArray;
+const UCHAR * const FsRtlLegalAnsiCharacterArray = LegalAnsiCharacterArray;
/* PRIVATE FUNCTIONS *********************************************************/
Modified: trunk/reactos/ntoskrnl/include/internal/fsrtl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/fsrtl.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/fsrtl.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -133,5 +133,4 @@
// Global data inside the File System Runtime Library
//
extern PERESOURCE FsRtlPagingIoResources;
-extern PUCHAR _FsRtlLegalAnsiCharacterArray;
extern PAGED_LOOKASIDE_LIST FsRtlFileLockLookasideList;
Modified: trunk/reactos/ntoskrnl/include/internal/kd.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/kd.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -1,19 +1,12 @@
#pragma once
#include <cportlib/cportlib.h>
-
-#ifdef _M_PPC
-#define KdDebuggerEnabled _KdDebuggerEnabled
-#define KdDebuggerNotPresent _KdDebuggerNotPresent
-#endif
//
// Kernel Debugger Port Definition
//
struct _KD_DISPATCH_TABLE;
extern CPPORT GdbPortInfo;
-extern BOOLEAN _KdDebuggerEnabled;
-extern BOOLEAN _KdDebuggerNotPresent;
extern BOOLEAN KdBreakAfterSymbolLoad;
extern BOOLEAN KdPitchDebugger;
extern BOOLEAN KdIgnoreUmExceptions;
Modified: trunk/reactos/ntoskrnl/include/internal/kd64.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
==============================================================================
--- trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/internal/kd64.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -494,8 +494,6 @@
extern PKDEBUG_SWITCH_ROUTINE KiDebugSwitchRoutine;
extern BOOLEAN KdBreakAfterSymbolLoad;
extern BOOLEAN KdPitchDebugger;
-extern BOOLEAN _KdDebuggerNotPresent;
-extern BOOLEAN _KdDebuggerEnabled;
extern BOOLEAN KdAutoEnableOnEvent;
extern BOOLEAN KdBlockEnable;
extern BOOLEAN KdIgnoreUmExceptions;
Modified: trunk/reactos/ntoskrnl/include/ntoskrnl.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/ntoskrnl.…
==============================================================================
--- trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/include/ntoskrnl.h [iso-8859-1] Sun May 11 23:11:16 2014
@@ -90,31 +90,8 @@
//
// Define the internal versions of external and public global data
//
-#define IoFileObjectType _IoFileObjectType
-#define PsThreadType _PsThreadType
-#define PsProcessType _PsProcessType
-#define ExEventObjectType _ExEventObjectType
-#define ExSemaphoreObjectType _ExSemaphoreObjectType
-#define KdDebuggerEnabled _KdDebuggerEnabled
-#define KdDebuggerNotPresent _KdDebuggerNotPresent
-#define NlsOemLeadByteInfo _NlsOemLeadByteInfo
-extern PUSHORT _NlsOemLeadByteInfo;
#define KeNumberProcessors _KeNumberProcessors
extern UCHAR _KeNumberProcessors;
-#define FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
-#undef LEGAL_ANSI_CHARACTER_ARRAY
-#undef NLS_MB_CODE_PAGE_TAG
-#undef NLS_OEM_LEAD_BYTE_INFO
-#define LEGAL_ANSI_CHARACTER_ARRAY FsRtlLegalAnsiCharacterArray
-#define NLS_MB_CODE_PAGE_TAG NlsMbOemCodePageTag
-#define NLS_OEM_LEAD_BYTE_INFO _NlsOemLeadByteInfo
-#undef KD_DEBUGGER_ENABLED
-#undef KD_DEBUGGER_NOT_PRESENT
-#define KD_DEBUGGER_ENABLED KdDebuggerEnabled
-#define KD_DEBUGGER_NOT_PRESENT KdDebuggerNotPresent
-#define HalDispatchTable _HalDispatchTable
-#undef HALDISPATCH
-#define HALDISPATCH (&HalDispatchTable)
#define ExRaiseStatus RtlRaiseStatus
/* Internal Headers */
Modified: trunk/reactos/ntoskrnl/kd64/kdapi.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdapi.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd64/kdapi.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -1903,9 +1903,7 @@
/* We are disabled now */
KdDebuggerEnabled = FALSE;
-#undef KdDebuggerEnabled
SharedUserData->KdDebuggerEnabled = FALSE;
-#define KdDebuggerEnabled _KdDebuggerEnabled
}
}
Modified: trunk/reactos/ntoskrnl/kd64/kddata.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kddata.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -79,8 +79,8 @@
//
BOOLEAN KdBreakAfterSymbolLoad;
BOOLEAN KdPitchDebugger;
-BOOLEAN _KdDebuggerNotPresent;
-BOOLEAN _KdDebuggerEnabled;
+BOOLEAN KdDebuggerNotPresent;
+BOOLEAN KdDebuggerEnabled;
BOOLEAN KdAutoEnableOnEvent;
BOOLEAN KdBlockEnable;
BOOLEAN KdIgnoreUmExceptions;
Modified: trunk/reactos/ntoskrnl/kd64/kdinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/kd64/kdinit.c?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/kd64/kdinit.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -310,9 +310,7 @@
KdDebuggerEnabled = TRUE;
/* Let user-mode know that it's enabled as well */
-#undef KdDebuggerEnabled
SharedUserData->KdDebuggerEnabled = TRUE;
-#define KdDebuggerEnabled _KdDebuggerEnabled
/* Check if the debugger should be disabled initially */
if (DisableKdAfterInit)
Modified: trunk/reactos/ntoskrnl/ntoskrnl.spec
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ntoskrnl.spec?rev…
==============================================================================
--- trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ntoskrnl.spec [iso-8859-1] Sun May 11 23:11:16 2014
@@ -82,7 +82,7 @@
@ stdcall ExEnterCriticalRegionAndAcquireResourceShared(ptr)
@ stdcall ExEnterCriticalRegionAndAcquireSharedWaitForExclusive(ptr)
@ stdcall ExEnumHandleTable(ptr ptr ptr ptr)
-@ extern ExEventObjectType _ExEventObjectType
+@ extern ExEventObjectType
@ stdcall ExExtendZone(ptr ptr long)
@ stdcall ExFreeCacheAwareRundownProtection(ptr)
@ stdcall ExFreePool(ptr)
@@ -144,7 +144,7 @@
@ fastcall ExReleaseRundownProtectionEx(ptr long) ExfReleaseRundownProtectionEx
@ fastcall ExRundownCompleted(ptr) ExfRundownCompleted
@ fastcall ExRundownCompletedCacheAware(ptr) ExfRundownCompletedCacheAware
-@ extern ExSemaphoreObjectType _ExSemaphoreObjectType
+@ extern ExSemaphoreObjectType
@ stdcall ExSetResourceOwnerPointer(ptr ptr)
@ stdcall ExSetTimerResolution(long long)
@ stdcall ExSizeOfRundownProtectionCacheAware()
@@ -241,7 +241,7 @@
@ stdcall FsRtlIsNtstatusExpected(long)
@ stdcall FsRtlIsPagingFile(ptr)
@ stdcall FsRtlIsTotalDeviceFailure(ptr)
-@ extern FsRtlLegalAnsiCharacterArray _FsRtlLegalAnsiCharacterArray
+@ extern FsRtlLegalAnsiCharacterArray
@ stdcall FsRtlLookupBaseMcbEntry(ptr long long ptr ptr ptr ptr ptr)
@ stdcall FsRtlLookupLargeMcbEntry(ptr long long ptr ptr ptr ptr ptr)
@ stdcall FsRtlLookupLastBaseMcbEntry(ptr ptr ptr)
@@ -302,7 +302,7 @@
@ stdcall FsRtlUninitializeLargeMcb(ptr)
@ stdcall FsRtlUninitializeMcb(ptr)
@ stdcall FsRtlUninitializeOplock(ptr)
-@ extern HalDispatchTable _HalDispatchTable
+@ extern HalDispatchTable
@ fastcall HalExamineMBR(ptr long long ptr)
@ extern HalPrivateDispatchTable
@ stdcall HeadlessDispatch(long ptr long ptr ptr)
@@ -393,7 +393,7 @@
@ stdcall IoEnumerateDeviceObjectList(ptr ptr long ptr)
@ stdcall IoEnumerateRegisteredFiltersList(ptr long ptr)
@ stdcall IoFastQueryNetworkAttributes(ptr long long ptr ptr)
-@ extern IoFileObjectType _IoFileObjectType
+@ extern IoFileObjectType
@ stdcall IoForwardAndCatchIrp(ptr ptr) IoForwardIrpSynchronously
@ stdcall IoForwardIrpSynchronously(ptr ptr)
@ stdcall IoFreeController(ptr)
@@ -533,8 +533,8 @@
@ fastcall IofCallDriver(ptr ptr)
@ fastcall IofCompleteRequest(ptr long)
@ stdcall KdChangeOption(long long ptr long ptr ptr)
-@ extern KdDebuggerEnabled _KdDebuggerEnabled
-@ extern KdDebuggerNotPresent _KdDebuggerNotPresent
+@ extern KdDebuggerEnabled
+@ extern KdDebuggerNotPresent
@ stdcall KdDisableDebugger()
@ stdcall KdEnableDebugger()
@ extern KdEnteredDebugger
@@ -830,7 +830,7 @@
@ extern NlsMbCodePageTag
@ extern NlsMbOemCodePageTag
@ extern NlsOemCodePage
-@ extern NlsOemLeadByteInfo _NlsOemLeadByteInfo
+@ extern NlsOemLeadByteInfo
@ stdcall NtAddAtom(wstr long ptr)
@ stdcall NtAdjustPrivilegesToken(ptr long ptr long ptr ptr)
@ stdcall -arch=i386,arm NtAlertThread(ptr)
@@ -1011,7 +1011,7 @@
@ stdcall PsLookupProcessByProcessId(ptr ptr)
@ stdcall PsLookupProcessThreadByCid(ptr ptr ptr)
@ stdcall PsLookupThreadByThreadId(ptr ptr)
-@ extern PsProcessType _PsProcessType
+@ extern PsProcessType
@ stdcall PsReferenceImpersonationToken(ptr ptr ptr ptr)
@ stdcall PsReferencePrimaryToken(ptr)
@ stdcall PsRemoveCreateThreadNotifyRoutine(ptr)
@@ -1036,7 +1036,7 @@
@ stdcall PsSetThreadHardErrorsAreDisabled(ptr long)
@ stdcall PsSetThreadWin32Thread(ptr ptr ptr)
@ stdcall PsTerminateSystemThread(long)
-@ extern PsThreadType _PsThreadType
+@ extern PsThreadType
;PsWrapApcWow64Thread
@ stdcall -arch=i386,arm READ_REGISTER_BUFFER_UCHAR(ptr ptr long)
@ stdcall -arch=i386,arm READ_REGISTER_BUFFER_ULONG(ptr ptr long)
Modified: trunk/reactos/tools/spec2def/spec2def.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/spec2def/spec2def.c?…
==============================================================================
--- trunk/reactos/tools/spec2def/spec2def.c [iso-8859-1] (original)
+++ trunk/reactos/tools/spec2def/spec2def.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -52,7 +52,6 @@
FL_STUB = 2,
FL_NONAME = 4,
FL_ORDINAL = 8,
- FL_DATA_ALIAS = 16
};
enum
@@ -508,9 +507,7 @@
fprintf(fileDest, " PRIVATE");
}
- /* Make this a data export, unless this is MSVC and -withalias was given */
- if ((pexp->nCallingConvention == CC_EXTERN) &&
- !(gbMSComp && (pexp->uFlags & FL_DATA_ALIAS)))
+ if (pexp->nCallingConvention == CC_EXTERN)
{
fprintf(fileDest, " DATA");
}
@@ -662,15 +659,6 @@
else if (CompareToken(pc, "-stub"))
{
exp.uFlags |= FL_STUB;
- }
- else if (CompareToken(pc, "-withalias"))
- {
- /* This flag is to create a nin _imp_ prefixed alias for a
- data export, so that the hacked DDK declarations work */
- if (exp.nCallingConvention != CC_EXTERN)
- fprintf(stderr, "error: line %d -withalias on non-data
export\n", nLine);
- else
- exp.uFlags |= FL_DATA_ALIAS;
}
else if (CompareToken(pc, "-norelay") ||
CompareToken(pc, "-register") ||
Modified: trunk/reactos/win32ss/gdi/eng/engevent.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/gdi/eng/engevent.c…
==============================================================================
--- trunk/reactos/win32ss/gdi/eng/engevent.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/gdi/eng/engevent.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -134,7 +134,7 @@
/* Create a handle, and have Ob fill out the pKEvent field */
Status = ObReferenceObjectByHandle(EngEvent,
EVENT_ALL_ACCESS,
- ExEventObjectType,
+ *ExEventObjectType,
UserMode,
&EngEvent->pKEvent,
NULL);
Modified: trunk/reactos/win32ss/user/ntuser/main.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/main.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/main.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -320,7 +320,7 @@
goto error;
}
Status = ObReferenceObjectByHandle(ptiCurrent->hEventQueueClient, 0,
- ExEventObjectType, KernelMode,
+ *ExEventObjectType, KernelMode,
(PVOID*)&ptiCurrent->pEventQueueServer,
NULL);
if (!NT_SUCCESS(Status))
{
Modified: trunk/reactos/win32ss/user/ntuser/message.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/messag…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/message.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -1548,7 +1548,7 @@
{
RETURN(FALSE);
}
-
+
ptiSendTo = IntSendTo(Window, Win32Thread, Msg);
if (Msg & 0x80000000 &&
@@ -2755,7 +2755,7 @@
((ClientInfo->CI_flags &
CI_CURTHPRHOOK) ? 1 : 0),
(LPARAM)&CWP,
Hook->Proc,
- Hook->ihmod,
+ Hook->ihmod,
Hook->offPfn,
Hook->Ansi,
&Hook->ModuleName);
@@ -2774,7 +2774,7 @@
((ClientInfo->CI_flags &
CI_CURTHPRHOOK) ? 1 : 0),
(LPARAM)&CWPR,
Hook->Proc,
- Hook->ihmod,
+ Hook->ihmod,
Hook->offPfn,
Hook->Ansi,
&Hook->ModuleName);
@@ -2833,7 +2833,7 @@
Status = ObReferenceObjectByHandle(hProcess,
PROCESS_QUERY_INFORMATION,
- PsProcessType,
+ *PsProcessType,
UserMode,
(PVOID*)&Process,
NULL);
Modified: trunk/reactos/win32ss/user/ntuser/misc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/user/ntuser/misc.c…
==============================================================================
--- trunk/reactos/win32ss/user/ntuser/misc.c [iso-8859-1] (original)
+++ trunk/reactos/win32ss/user/ntuser/misc.c [iso-8859-1] Sun May 11 23:11:16 2014
@@ -223,7 +223,7 @@
break;
case THREADSTATE_INSENDMESSAGE:
{
- PUSER_SENT_MESSAGE Message =
+ PUSER_SENT_MESSAGE Message =
((PTHREADINFO)PsGetCurrentThreadWin32Thread())->pusmCurrent;
ERR("THREADSTATE_INSENDMESSAGE\n");
@@ -243,7 +243,7 @@
if (Message->QS_Flags & QS_SMRESULT) ret |= ISMEX_REPLIED;
}
- break;
+ break;
}
case THREADSTATE_GETMESSAGETIME:
ret = ((PTHREADINFO)PsGetCurrentThreadWin32Thread())->timeLast;
@@ -289,7 +289,7 @@
DWORD Ret = 0;
// Test the only flags user can change.
if (Set &
~(QF_FF10STATUS|QF_DIALOGACTIVE|QF_TABSWITCHING|QF_FMENUSTATUS|QF_FMENUSTATUSBREAK))
return 0;
- if (Flags &
~(QF_FF10STATUS|QF_DIALOGACTIVE|QF_TABSWITCHING|QF_FMENUSTATUS|QF_FMENUSTATUSBREAK))
return 0;
+ if (Flags &
~(QF_FF10STATUS|QF_DIALOGACTIVE|QF_TABSWITCHING|QF_FMENUSTATUS|QF_FMENUSTATUSBREAK))
return 0;
UserEnterExclusive();
pti = PsGetCurrentThreadWin32Thread();
if (pti->MessageQueue)
@@ -448,7 +448,7 @@
Status = ObReferenceObjectByHandle(hProcess,
PROCESS_QUERY_INFORMATION,
- PsProcessType,
+ *PsProcessType,
ExGetPreviousMode(),
(PVOID*)&Process,
NULL);
@@ -656,7 +656,7 @@
ASSERT(pci->ulClientDelta == DesktopHeapGetUserDelta());
if (pti->pcti && pci->pDeskInfo)
ASSERT(pci->pClientThreadInfo == (PVOID)((ULONG_PTR)pti->pcti -
pci->ulClientDelta));
- if (pti->KeyboardLayout)
+ if (pti->KeyboardLayout)
ASSERT(pci->hKL == pti->KeyboardLayout->hkl);
if(pti->rpdesk != NULL)
ASSERT(pti->pDeskInfo == pti->rpdesk->pDeskInfo);