diff --git a/reactos/drivers/video/miniport/vbe/vbemp.c b/reactos/drivers/video/miniport/vbe/vbemp.c index 72ab4f2eab7..103fe07d166 100644 --- a/reactos/drivers/video/miniport/vbe/vbemp.c +++ b/reactos/drivers/video/miniport/vbe/vbemp.c @@ -29,6 +29,11 @@ #include "vbemp.h" +#undef LOWORD +#undef HIWORD +#define LOWORD(l) ((USHORT)((ULONG_PTR)(l))) +#define HIWORD(l) ((USHORT)(((ULONG_PTR)(l)>>16)&0xFFFF)) + /* PUBLIC AND PRIVATE FUNCTIONS ***********************************************/ VP_STATUS STDCALL diff --git a/reactos/drivers/video/miniport/vbe/vbemp.h b/reactos/drivers/video/miniport/vbe/vbemp.h index 09233402460..b6073098719 100644 --- a/reactos/drivers/video/miniport/vbe/vbemp.h +++ b/reactos/drivers/video/miniport/vbe/vbemp.h @@ -30,6 +30,7 @@ #include #endif +#include "dderror.h" #include "miniport.h" #include "ntddvdeo.h" #include "video.h" diff --git a/reactos/drivers/video/miniport/vga/vgamp.h b/reactos/drivers/video/miniport/vga/vgamp.h index 3084dad484e..8c96e80f7db 100644 --- a/reactos/drivers/video/miniport/vga/vgamp.h +++ b/reactos/drivers/video/miniport/vga/vgamp.h @@ -30,6 +30,7 @@ #include #endif +#include "dderror.h" #include "miniport.h" #include "ntddvdeo.h" #include "video.h" diff --git a/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h b/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h index 0357551e5c2..de8e28eed96 100644 --- a/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h +++ b/reactos/drivers/video/miniport/xboxvmp/xboxvmp.h @@ -33,6 +33,7 @@ #include #endif +#include "dderror.h" #include "miniport.h" #include "ntddvdeo.h" #include "video.h" diff --git a/reactos/drivers/video/videoprt/interrupt.c b/reactos/drivers/video/videoprt/interrupt.c index f27bb84162c..46aee32782e 100644 --- a/reactos/drivers/video/videoprt/interrupt.c +++ b/reactos/drivers/video/videoprt/interrupt.c @@ -123,7 +123,7 @@ VideoPortEnableInterrupt(IN PVOID HwDeviceExtension) 0, DeviceExtension->InterruptLevel); - return Status ? NO_ERROR : ERROR_INVALID_ACCESS; + return Status ? NO_ERROR : ERROR_INVALID_PARAMETER; } /* @@ -144,5 +144,5 @@ VideoPortDisableInterrupt(IN PVOID HwDeviceExtension) DeviceExtension->InterruptVector, 0); - return Status ? NO_ERROR : ERROR_INVALID_ACCESS; + return Status ? NO_ERROR : ERROR_INVALID_PARAMETER; } diff --git a/reactos/drivers/video/videoprt/resource.c b/reactos/drivers/video/videoprt/resource.c index 43414966c02..f967943c316 100644 --- a/reactos/drivers/video/videoprt/resource.c +++ b/reactos/drivers/video/videoprt/resource.c @@ -332,7 +332,7 @@ VideoPortMapBankedMemory( { TRACE_(VIDEOPRT, "VideoPortMapBankedMemory\n"); UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + return ERROR_INVALID_FUNCTION; } @@ -437,7 +437,7 @@ VideoPortGetAccessRanges( if (ReturnedLength != sizeof(PCI_COMMON_CONFIG)) { - return ERROR_NO_SYSTEM_RESOURCES; + return ERROR_NOT_ENOUGH_MEMORY; } } else @@ -504,7 +504,7 @@ VideoPortGetAccessRanges( DeviceExtension->AllocatedResources = AllocatedResources; } if (AllocatedResources == NULL) - return ERROR_NO_SYSTEM_RESOURCES; + return ERROR_NOT_ENOUGH_MEMORY; AssignedCount = 0; for (FullList = AllocatedResources->List; @@ -524,14 +524,14 @@ VideoPortGetAccessRanges( AssignedCount >= NumAccessRanges) { WARN_(VIDEOPRT, "Too many access ranges found\n"); - return ERROR_NO_SYSTEM_RESOURCES; + return ERROR_NOT_ENOUGH_MEMORY; } if (Descriptor->Type == CmResourceTypeMemory) { if (NumAccessRanges <= AssignedCount) { WARN_(VIDEOPRT, "Too many access ranges found\n"); - return ERROR_NO_SYSTEM_RESOURCES; + return ERROR_NOT_ENOUGH_MEMORY; } INFO_(VIDEOPRT, "Memory range starting at 0x%08x length 0x%08x\n", Descriptor->u.Memory.Start.u.LowPart, Descriptor->u.Memory.Length); @@ -667,7 +667,7 @@ VideoPortGetDeviceData( { TRACE_(VIDEOPRT, "VideoPortGetDeviceData\n"); UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + return ERROR_INVALID_FUNCTION; } /* diff --git a/reactos/drivers/video/videoprt/services.c b/reactos/drivers/video/videoprt/services.c index 7b6b5e9b084..de326ae58f4 100644 --- a/reactos/drivers/video/videoprt/services.c +++ b/reactos/drivers/video/videoprt/services.c @@ -77,11 +77,11 @@ VideoPortQueryServices( case VideoPortServicesI2C: UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + return ERROR_INVALID_FUNCTION; case VideoPortServicesHeadless: UNIMPLEMENTED; - return ERROR_CALL_NOT_IMPLEMENTED; + return ERROR_INVALID_FUNCTION; default: break; diff --git a/reactos/drivers/video/videoprt/videoprt.c b/reactos/drivers/video/videoprt/videoprt.c index 636b7120f5a..cd24e74d391 100644 --- a/reactos/drivers/video/videoprt/videoprt.c +++ b/reactos/drivers/video/videoprt/videoprt.c @@ -856,7 +856,7 @@ VideoPortGetRegistryParameters( UNIMPLEMENTED; } - return ERROR_SUCCESS; + return NO_ERROR; } /* @@ -884,7 +884,7 @@ VideoPortSetRegistryParameters( ValueData, ValueLength); - if (Status != ERROR_SUCCESS) + if (Status != NO_ERROR) WARN_(VIDEOPRT, "VideoPortSetRegistryParameters error 0x%x\n", Status); return Status; diff --git a/reactos/drivers/video/videoprt/videoprt.h b/reactos/drivers/video/videoprt/videoprt.h index 870092c2d1c..e249f005cf7 100644 --- a/reactos/drivers/video/videoprt/videoprt.h +++ b/reactos/drivers/video/videoprt/videoprt.h @@ -32,6 +32,8 @@ #include #include #include +#include +#include #include