mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 08:03:03 +00:00
- More MSVC fixes
svn path=/trunk/; revision=28174
This commit is contained in:
parent
f3af35532e
commit
56c73282c2
13 changed files with 28 additions and 26 deletions
|
@ -55,8 +55,8 @@ Author:
|
||||||
// The DDK steals these away from you.
|
// The DDK steals these away from you.
|
||||||
//
|
//
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
//void _enable(void);
|
void _enable(void);
|
||||||
//void _disable(void);
|
void _disable(void);
|
||||||
#pragma intrinsic(_enable)
|
#pragma intrinsic(_enable)
|
||||||
#pragma intrinsic(_disable)
|
#pragma intrinsic(_disable)
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -1094,7 +1094,7 @@ ExpInitializeExecutive(IN ULONG Cpu,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Update length */
|
/* Update length */
|
||||||
CmCSDVersionString.MaximumLength = (USHORT)sizeof(Buffer) - Remaining;
|
CmCSDVersionString.MaximumLength = sizeof(Buffer) - (USHORT)Remaining;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Check if we have an RC number */
|
/* Check if we have an RC number */
|
||||||
|
|
|
@ -165,7 +165,7 @@ typedef struct
|
||||||
|
|
||||||
typedef struct _MM_SECTION_SEGMENT
|
typedef struct _MM_SECTION_SEGMENT
|
||||||
{
|
{
|
||||||
LONGLONG FileOffset; /* start offset into the file for image sections */
|
LONG FileOffset; /* start offset into the file for image sections */
|
||||||
ULONG_PTR VirtualAddress; /* dtart offset into the address range for image sections */
|
ULONG_PTR VirtualAddress; /* dtart offset into the address range for image sections */
|
||||||
ULONG RawLength; /* length of the segment which is part of the mapped file */
|
ULONG RawLength; /* length of the segment which is part of the mapped file */
|
||||||
ULONG Length; /* absolute length of the segment */
|
ULONG Length; /* absolute length of the segment */
|
||||||
|
@ -184,8 +184,8 @@ typedef struct _MM_IMAGE_SECTION_OBJECT
|
||||||
ULONG_PTR StackReserve;
|
ULONG_PTR StackReserve;
|
||||||
ULONG_PTR StackCommit;
|
ULONG_PTR StackCommit;
|
||||||
ULONG_PTR EntryPoint;
|
ULONG_PTR EntryPoint;
|
||||||
ULONG Subsystem;
|
USHORT Subsystem;
|
||||||
ULONG ImageCharacteristics;
|
USHORT ImageCharacteristics;
|
||||||
USHORT MinorSubsystemVersion;
|
USHORT MinorSubsystemVersion;
|
||||||
USHORT MajorSubsystemVersion;
|
USHORT MajorSubsystemVersion;
|
||||||
USHORT Machine;
|
USHORT Machine;
|
||||||
|
|
|
@ -12,15 +12,14 @@
|
||||||
#include <ntverp.h>
|
#include <ntverp.h>
|
||||||
#define _WIN32_WINNT _WIN32_WINNT_WS03
|
#define _WIN32_WINNT _WIN32_WINNT_WS03
|
||||||
#define NTDDI_VERSION NTDDI_WS03SP1
|
#define NTDDI_VERSION NTDDI_WS03SP1
|
||||||
#define NTKERNELAPI
|
|
||||||
#define NOEXTAPI
|
|
||||||
|
|
||||||
/* DDK/IFS/NDK Headers */
|
/* DDK/IFS/NDK Headers */
|
||||||
#define NTKERNELAPI
|
#ifdef _MSC_VER
|
||||||
#define NOEXTAPI
|
#include <ntdef.h>
|
||||||
|
#undef DECLSPEC_IMPORT
|
||||||
|
#define DECLSPEC_IMPORT
|
||||||
|
#endif
|
||||||
#include <ntifs.h>
|
#include <ntifs.h>
|
||||||
#undef _KPROCESS
|
|
||||||
#undef _EPROCESS
|
|
||||||
#include <wdmguid.h>
|
#include <wdmguid.h>
|
||||||
#include <arc/arc.h>
|
#include <arc/arc.h>
|
||||||
#include <ntndk.h>
|
#include <ntndk.h>
|
||||||
|
@ -55,6 +54,7 @@
|
||||||
#include <arc/setupblk.h>
|
#include <arc/setupblk.h>
|
||||||
|
|
||||||
/* KD Support */
|
/* KD Support */
|
||||||
|
#define NOEXTAPI
|
||||||
#include <windbgkd.h>
|
#include <windbgkd.h>
|
||||||
#include <wdbgexts.h>
|
#include <wdbgexts.h>
|
||||||
#include <kddll.h>
|
#include <kddll.h>
|
||||||
|
|
|
@ -92,7 +92,7 @@ IoCreateController(IN ULONG Size)
|
||||||
/* Zero the Object and set its data */
|
/* Zero the Object and set its data */
|
||||||
RtlZeroMemory(Controller, sizeof(CONTROLLER_OBJECT) + Size);
|
RtlZeroMemory(Controller, sizeof(CONTROLLER_OBJECT) + Size);
|
||||||
Controller->Type = IO_TYPE_CONTROLLER;
|
Controller->Type = IO_TYPE_CONTROLLER;
|
||||||
Controller->Size = (CSHORT)sizeof(CONTROLLER_OBJECT) + Size;
|
Controller->Size = sizeof(CONTROLLER_OBJECT) + (CSHORT)Size;
|
||||||
Controller->ControllerExtension = (Controller + 1);
|
Controller->ControllerExtension = (Controller + 1);
|
||||||
|
|
||||||
/* Initialize its Queue */
|
/* Initialize its Queue */
|
||||||
|
|
|
@ -765,7 +765,7 @@ IoCreateDevice(IN PDRIVER_OBJECT DriverObject,
|
||||||
* because that's only padding for the DevObjExt and not part of the Object.
|
* because that's only padding for the DevObjExt and not part of the Object.
|
||||||
*/
|
*/
|
||||||
CreatedDeviceObject->Type = IO_TYPE_DEVICE;
|
CreatedDeviceObject->Type = IO_TYPE_DEVICE;
|
||||||
CreatedDeviceObject->Size = (USHORT)sizeof(DEVICE_OBJECT) + DeviceExtensionSize;
|
CreatedDeviceObject->Size = sizeof(DEVICE_OBJECT) + (USHORT)DeviceExtensionSize;
|
||||||
|
|
||||||
/* The kernel extension is after the driver internal extension */
|
/* The kernel extension is after the driver internal extension */
|
||||||
DeviceObjectExtension = (PDEVOBJ_EXTENSION)
|
DeviceObjectExtension = (PDEVOBJ_EXTENSION)
|
||||||
|
|
|
@ -1126,7 +1126,9 @@ try_again:
|
||||||
if (!DriverName)
|
if (!DriverName)
|
||||||
{
|
{
|
||||||
/* Create a random name and set up the string*/
|
/* Create a random name and set up the string*/
|
||||||
NameLength = swprintf(NameBuffer, L"\\Driver\\%08u", KeTickCount);
|
NameLength = (USHORT)swprintf(NameBuffer,
|
||||||
|
L"\\Driver\\%08u",
|
||||||
|
KeTickCount);
|
||||||
LocalDriverName.Length = NameLength * sizeof(WCHAR);
|
LocalDriverName.Length = NameLength * sizeof(WCHAR);
|
||||||
LocalDriverName.MaximumLength = LocalDriverName.Length + sizeof(UNICODE_NULL);
|
LocalDriverName.MaximumLength = LocalDriverName.Length + sizeof(UNICODE_NULL);
|
||||||
LocalDriverName.Buffer = NameBuffer;
|
LocalDriverName.Buffer = NameBuffer;
|
||||||
|
|
|
@ -338,8 +338,8 @@ IopLogWorker(IN PVOID Parameter)
|
||||||
if (NT_SUCCESS(Status))
|
if (NT_SUCCESS(Status))
|
||||||
{
|
{
|
||||||
/* Success, update the information */
|
/* Success, update the information */
|
||||||
ObjectNameInfo->Name.Length = (USHORT)100 -
|
ObjectNameInfo->Name.Length =
|
||||||
DriverNameLength;
|
100 - (USHORT)DriverNameLength;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -183,8 +183,8 @@ MmGetContinuousPages(ULONG NumberOfBytes,
|
||||||
|
|
||||||
KeAcquireSpinLock(&PageListLock, &oldIrql);
|
KeAcquireSpinLock(&PageListLock, &oldIrql);
|
||||||
|
|
||||||
last = min(HighestAcceptableAddress.QuadPart / PAGE_SIZE, MmPageArraySize - 1);
|
last = min(HighestAcceptableAddress.LowPart / PAGE_SIZE, MmPageArraySize - 1);
|
||||||
boundary = BoundaryAddressMultiple.QuadPart / PAGE_SIZE;
|
boundary = BoundaryAddressMultiple.LowPart / PAGE_SIZE;
|
||||||
|
|
||||||
for (j = 0; j < 2; j++)
|
for (j = 0; j < 2; j++)
|
||||||
{
|
{
|
||||||
|
@ -195,7 +195,7 @@ MmGetContinuousPages(ULONG NumberOfBytes,
|
||||||
* pages above the 16MB area because the caller has specify an upper limit.
|
* pages above the 16MB area because the caller has specify an upper limit.
|
||||||
* The second try uses the specified lower limit.
|
* The second try uses the specified lower limit.
|
||||||
*/
|
*/
|
||||||
for (i = j == 0 ? 0x100000 / PAGE_SIZE : LowestAcceptableAddress.QuadPart / PAGE_SIZE; i <= last; )
|
for (i = j == 0 ? 0x100000 / PAGE_SIZE : LowestAcceptableAddress.LowPart / PAGE_SIZE; i <= last; )
|
||||||
{
|
{
|
||||||
if (MmPageArray[i].Flags.Type == MM_PHYSICAL_PAGE_FREE)
|
if (MmPageArray[i].Flags.Type == MM_PHYSICAL_PAGE_FREE)
|
||||||
{
|
{
|
||||||
|
@ -1017,8 +1017,8 @@ MmAllocPagesSpecifyRange(ULONG Consumer,
|
||||||
if (NumberOfPages == 0)
|
if (NumberOfPages == 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
LowestPage = LowestAddress.QuadPart / PAGE_SIZE;
|
LowestPage = LowestAddress.LowPart / PAGE_SIZE;
|
||||||
HighestPage = HighestAddress.QuadPart / PAGE_SIZE;
|
HighestPage = HighestAddress.LowPart / PAGE_SIZE;
|
||||||
if ((HighestAddress.u.LowPart % PAGE_SIZE) != 0)
|
if ((HighestAddress.u.LowPart % PAGE_SIZE) != 0)
|
||||||
HighestPage++;
|
HighestPage++;
|
||||||
|
|
||||||
|
|
|
@ -625,7 +625,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
|
||||||
|
|
||||||
if (Address < MmSystemRangeStart && Process && Process != PsGetCurrentProcess())
|
if (Address < MmSystemRangeStart && Process && Process != PsGetCurrentProcess())
|
||||||
{
|
{
|
||||||
PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.QuadPart));
|
PageDir = MmCreateHyperspaceMapping(PTE_TO_PFN(Process->Pcb.DirectoryTableBase.LowPart));
|
||||||
if (PageDir == NULL)
|
if (PageDir == NULL)
|
||||||
{
|
{
|
||||||
KEBUGCHECK(0);
|
KEBUGCHECK(0);
|
||||||
|
|
|
@ -95,7 +95,7 @@ MmMapIoSpace (IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
DPRINT("MmMapIoSpace failed (%lx)\n", Status);
|
DPRINT("MmMapIoSpace failed (%lx)\n", Status);
|
||||||
return (NULL);
|
return (NULL);
|
||||||
}
|
}
|
||||||
Pfn = PhysicalAddress.QuadPart >> PAGE_SHIFT;
|
Pfn = PhysicalAddress.LowPart >> PAGE_SHIFT;
|
||||||
for (i = 0; i < PAGE_ROUND_UP(NumberOfBytes); i += PAGE_SIZE, Pfn++)
|
for (i = 0; i < PAGE_ROUND_UP(NumberOfBytes); i += PAGE_SIZE, Pfn++)
|
||||||
{
|
{
|
||||||
Status = MmCreateVirtualMappingForKernel((char*)Result + i,
|
Status = MmCreateVirtualMappingForKernel((char*)Result + i,
|
||||||
|
|
|
@ -273,7 +273,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MEMORY_AREA_SHARED_DATA:
|
case MEMORY_AREA_SHARED_DATA:
|
||||||
Pfn = MmSharedDataPagePhysicalAddress.QuadPart >> PAGE_SHIFT;
|
Pfn = MmSharedDataPagePhysicalAddress.LowPart >> PAGE_SHIFT;
|
||||||
Status =
|
Status =
|
||||||
MmCreateVirtualMapping(PsGetCurrentProcess(),
|
MmCreateVirtualMapping(PsGetCurrentProcess(),
|
||||||
(PVOID)PAGE_ROUND_DOWN(Address),
|
(PVOID)PAGE_ROUND_DOWN(Address),
|
||||||
|
|
|
@ -611,7 +611,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
||||||
* Retrieve the page from the cache segment that we actually want.
|
* Retrieve the page from the cache segment that we actually want.
|
||||||
*/
|
*/
|
||||||
(*Page) = MmGetPhysicalAddress((char*)BaseAddress +
|
(*Page) = MmGetPhysicalAddress((char*)BaseAddress +
|
||||||
FileOffset - BaseOffset).QuadPart >> PAGE_SHIFT;
|
FileOffset - BaseOffset).LowPart >> PAGE_SHIFT;
|
||||||
|
|
||||||
CcRosReleaseCacheSegment(Bcb, CacheSeg, TRUE, FALSE, TRUE);
|
CcRosReleaseCacheSegment(Bcb, CacheSeg, TRUE, FALSE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue