mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 13:35:47 +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.
|
||||
//
|
||||
#ifdef _MSC_VER
|
||||
//void _enable(void);
|
||||
//void _disable(void);
|
||||
void _enable(void);
|
||||
void _disable(void);
|
||||
#pragma intrinsic(_enable)
|
||||
#pragma intrinsic(_disable)
|
||||
#endif
|
||||
|
|
|
@ -1094,7 +1094,7 @@ ExpInitializeExecutive(IN ULONG Cpu,
|
|||
}
|
||||
|
||||
/* Update length */
|
||||
CmCSDVersionString.MaximumLength = (USHORT)sizeof(Buffer) - Remaining;
|
||||
CmCSDVersionString.MaximumLength = sizeof(Buffer) - (USHORT)Remaining;
|
||||
}
|
||||
|
||||
/* Check if we have an RC number */
|
||||
|
|
|
@ -165,7 +165,7 @@ typedef struct
|
|||
|
||||
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 RawLength; /* length of the segment which is part of the mapped file */
|
||||
ULONG Length; /* absolute length of the segment */
|
||||
|
@ -184,8 +184,8 @@ typedef struct _MM_IMAGE_SECTION_OBJECT
|
|||
ULONG_PTR StackReserve;
|
||||
ULONG_PTR StackCommit;
|
||||
ULONG_PTR EntryPoint;
|
||||
ULONG Subsystem;
|
||||
ULONG ImageCharacteristics;
|
||||
USHORT Subsystem;
|
||||
USHORT ImageCharacteristics;
|
||||
USHORT MinorSubsystemVersion;
|
||||
USHORT MajorSubsystemVersion;
|
||||
USHORT Machine;
|
||||
|
|
|
@ -12,15 +12,14 @@
|
|||
#include <ntverp.h>
|
||||
#define _WIN32_WINNT _WIN32_WINNT_WS03
|
||||
#define NTDDI_VERSION NTDDI_WS03SP1
|
||||
#define NTKERNELAPI
|
||||
#define NOEXTAPI
|
||||
|
||||
/* DDK/IFS/NDK Headers */
|
||||
#define NTKERNELAPI
|
||||
#define NOEXTAPI
|
||||
#ifdef _MSC_VER
|
||||
#include <ntdef.h>
|
||||
#undef DECLSPEC_IMPORT
|
||||
#define DECLSPEC_IMPORT
|
||||
#endif
|
||||
#include <ntifs.h>
|
||||
#undef _KPROCESS
|
||||
#undef _EPROCESS
|
||||
#include <wdmguid.h>
|
||||
#include <arc/arc.h>
|
||||
#include <ntndk.h>
|
||||
|
@ -55,6 +54,7 @@
|
|||
#include <arc/setupblk.h>
|
||||
|
||||
/* KD Support */
|
||||
#define NOEXTAPI
|
||||
#include <windbgkd.h>
|
||||
#include <wdbgexts.h>
|
||||
#include <kddll.h>
|
||||
|
|
|
@ -92,7 +92,7 @@ IoCreateController(IN ULONG Size)
|
|||
/* Zero the Object and set its data */
|
||||
RtlZeroMemory(Controller, sizeof(CONTROLLER_OBJECT) + Size);
|
||||
Controller->Type = IO_TYPE_CONTROLLER;
|
||||
Controller->Size = (CSHORT)sizeof(CONTROLLER_OBJECT) + Size;
|
||||
Controller->Size = sizeof(CONTROLLER_OBJECT) + (CSHORT)Size;
|
||||
Controller->ControllerExtension = (Controller + 1);
|
||||
|
||||
/* 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.
|
||||
*/
|
||||
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 */
|
||||
DeviceObjectExtension = (PDEVOBJ_EXTENSION)
|
||||
|
|
|
@ -1126,7 +1126,9 @@ try_again:
|
|||
if (!DriverName)
|
||||
{
|
||||
/* 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.MaximumLength = LocalDriverName.Length + sizeof(UNICODE_NULL);
|
||||
LocalDriverName.Buffer = NameBuffer;
|
||||
|
|
|
@ -338,8 +338,8 @@ IopLogWorker(IN PVOID Parameter)
|
|||
if (NT_SUCCESS(Status))
|
||||
{
|
||||
/* Success, update the information */
|
||||
ObjectNameInfo->Name.Length = (USHORT)100 -
|
||||
DriverNameLength;
|
||||
ObjectNameInfo->Name.Length =
|
||||
100 - (USHORT)DriverNameLength;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -183,8 +183,8 @@ MmGetContinuousPages(ULONG NumberOfBytes,
|
|||
|
||||
KeAcquireSpinLock(&PageListLock, &oldIrql);
|
||||
|
||||
last = min(HighestAcceptableAddress.QuadPart / PAGE_SIZE, MmPageArraySize - 1);
|
||||
boundary = BoundaryAddressMultiple.QuadPart / PAGE_SIZE;
|
||||
last = min(HighestAcceptableAddress.LowPart / PAGE_SIZE, MmPageArraySize - 1);
|
||||
boundary = BoundaryAddressMultiple.LowPart / PAGE_SIZE;
|
||||
|
||||
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.
|
||||
* 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)
|
||||
{
|
||||
|
@ -1017,8 +1017,8 @@ MmAllocPagesSpecifyRange(ULONG Consumer,
|
|||
if (NumberOfPages == 0)
|
||||
return 0;
|
||||
|
||||
LowestPage = LowestAddress.QuadPart / PAGE_SIZE;
|
||||
HighestPage = HighestAddress.QuadPart / PAGE_SIZE;
|
||||
LowestPage = LowestAddress.LowPart / PAGE_SIZE;
|
||||
HighestPage = HighestAddress.LowPart / PAGE_SIZE;
|
||||
if ((HighestAddress.u.LowPart % PAGE_SIZE) != 0)
|
||||
HighestPage++;
|
||||
|
||||
|
|
|
@ -625,7 +625,7 @@ MmGetPageTableForProcess(PEPROCESS Process, PVOID Address, BOOLEAN Create)
|
|||
|
||||
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)
|
||||
{
|
||||
KEBUGCHECK(0);
|
||||
|
|
|
@ -95,7 +95,7 @@ MmMapIoSpace (IN PHYSICAL_ADDRESS PhysicalAddress,
|
|||
DPRINT("MmMapIoSpace failed (%lx)\n", Status);
|
||||
return (NULL);
|
||||
}
|
||||
Pfn = PhysicalAddress.QuadPart >> PAGE_SHIFT;
|
||||
Pfn = PhysicalAddress.LowPart >> PAGE_SHIFT;
|
||||
for (i = 0; i < PAGE_ROUND_UP(NumberOfBytes); i += PAGE_SIZE, Pfn++)
|
||||
{
|
||||
Status = MmCreateVirtualMappingForKernel((char*)Result + i,
|
||||
|
|
|
@ -273,7 +273,7 @@ MmNotPresentFault(KPROCESSOR_MODE Mode,
|
|||
break;
|
||||
|
||||
case MEMORY_AREA_SHARED_DATA:
|
||||
Pfn = MmSharedDataPagePhysicalAddress.QuadPart >> PAGE_SHIFT;
|
||||
Pfn = MmSharedDataPagePhysicalAddress.LowPart >> PAGE_SHIFT;
|
||||
Status =
|
||||
MmCreateVirtualMapping(PsGetCurrentProcess(),
|
||||
(PVOID)PAGE_ROUND_DOWN(Address),
|
||||
|
|
|
@ -611,7 +611,7 @@ MiReadPage(PMEMORY_AREA MemoryArea,
|
|||
* Retrieve the page from the cache segment that we actually want.
|
||||
*/
|
||||
(*Page) = MmGetPhysicalAddress((char*)BaseAddress +
|
||||
FileOffset - BaseOffset).QuadPart >> PAGE_SHIFT;
|
||||
FileOffset - BaseOffset).LowPart >> PAGE_SHIFT;
|
||||
|
||||
CcRosReleaseCacheSegment(Bcb, CacheSeg, TRUE, FALSE, TRUE);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue