- Videoprt should only use the error codes provided in dderror.h, fix that. Also include dderror.h and make the windef.h dependency explicit.

- Include dderror.h in vbemp/vgamp/xboxvmp too, and make sure vbemp gets its precious HIWORD/LOWORD

svn path=/trunk/; revision=37691
This commit is contained in:
Stefan Ginsberg
2008-11-27 20:05:12 +00:00
parent 59cf9318b8
commit 67bc5b6443
9 changed files with 22 additions and 12 deletions
@@ -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
@@ -30,6 +30,7 @@
#include <ntddk.h>
#endif
#include "dderror.h"
#include "miniport.h"
#include "ntddvdeo.h"
#include "video.h"
@@ -30,6 +30,7 @@
#include <ntddk.h>
#endif
#include "dderror.h"
#include "miniport.h"
#include "ntddvdeo.h"
#include "video.h"
@@ -33,6 +33,7 @@
#include <ntddk.h>
#endif
#include "dderror.h"
#include "miniport.h"
#include "ntddvdeo.h"
#include "video.h"
+2 -2
View File
@@ -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;
}
+6 -6
View File
@@ -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;
}
/*
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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;
@@ -32,6 +32,8 @@
#include <ntifs.h>
#include <ndk/ntndk.h>
#include <reactos/helper.h>
#include <dderror.h>
#include <windef.h>
#include <debug.h>