Basic VGA support
This commit is contained in:
parent
d9c6d518c6
commit
a3f72ee429
155
qxldod Package/qxldod Package.vcxproj
Executable file
155
qxldod Package/qxldod Package.vcxproj
Executable file
@ -0,0 +1,155 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Win8 Debug|Win32">
|
||||
<Configuration>Win8 Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win8 Release|Win32">
|
||||
<Configuration>Win8 Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Debug|Win32">
|
||||
<Configuration>Win7 Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Release|Win32">
|
||||
<Configuration>Win7 Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Debug|Win32">
|
||||
<Configuration>Vista Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Release|Win32">
|
||||
<Configuration>Vista Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win8 Debug|x64">
|
||||
<Configuration>Win8 Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win8 Release|x64">
|
||||
<Configuration>Win8 Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Debug|x64">
|
||||
<Configuration>Win7 Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Release|x64">
|
||||
<Configuration>Win7 Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Debug|x64">
|
||||
<Configuration>Vista Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Release|x64">
|
||||
<Configuration>Vista Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{B8C04B51-4207-491D-A7DD-C54861E8B528}</ProjectGuid>
|
||||
<TemplateGuid>{4605da2c-74a5-4865-98e1-152ef136825f}</TemplateGuid>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<Configuration>Win8 Debug</Configuration>
|
||||
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<RootNamespace>qxldod_Package</RootNamespace>
|
||||
<VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VisualStudioVersion)' == '11.0'">$(VCTargetsPath11)</VCTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="PropertySheets">
|
||||
<PlatformToolset>WindowsKernelModeDriver8.0</PlatformToolset>
|
||||
<ConfigurationType>Utility</ConfigurationType>
|
||||
<DriverType>Package</DriverType>
|
||||
<DisableFastUpToDateCheck>true</DisableFastUpToDateCheck>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
<EnableDeployment>False</EnableDeployment>
|
||||
<RemoveDriver>True</RemoveDriver>
|
||||
<HardwareIdString />
|
||||
<CommandLine />
|
||||
<DeployFiles />
|
||||
<EnableVerifier>False</EnableVerifier>
|
||||
<AllDrivers>False</AllDrivers>
|
||||
<VerifyProjectOutput>True</VerifyProjectOutput>
|
||||
<VerifyDrivers />
|
||||
<VerifyFlags>133563</VerifyFlags>
|
||||
<PackageDir>$(OutDir)qxldod Package</PackageDir>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\qxldod\qxldod.vcxproj">
|
||||
<Project>{a6f48fc7-97e9-48ec-bcdf-1e4f9b43aadd}</Project>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
9
qxldod Package/qxldod Package.vcxproj.filters
Executable file
9
qxldod Package/qxldod Package.vcxproj.filters
Executable file
@ -0,0 +1,9 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Driver Files">
|
||||
<UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier>
|
||||
<Extensions>inf;inv;inx;mof;mc;</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
</Project>
|
47
qxldod.sln
Executable file
47
qxldod.sln
Executable file
@ -0,0 +1,47 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 2012
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxldod", "qxldod\qxldod.vcxproj", "{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qxldod Package", "qxldod Package\qxldod Package.vcxproj", "{B8C04B51-4207-491D-A7DD-C54861E8B528}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD} = {A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Win8 Debug|Win32 = Win8 Debug|Win32
|
||||
Win8 Debug|x64 = Win8 Debug|x64
|
||||
Win8 Release|Win32 = Win8 Release|Win32
|
||||
Win8 Release|x64 = Win8 Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|x64.Build.0 = Win8 Debug|x64
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Release|Win32.Build.0 = Win8 Release|Win32
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Release|x64.ActiveCfg = Win8 Release|x64
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Release|x64.Build.0 = Win8 Release|x64
|
||||
{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}.Win8 Release|x64.Deploy.0 = Win8 Release|x64
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Debug|Win32.ActiveCfg = Win8 Debug|Win32
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Debug|Win32.Build.0 = Win8 Debug|Win32
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Debug|Win32.Deploy.0 = Win8 Debug|Win32
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Debug|x64.ActiveCfg = Win8 Debug|x64
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Debug|x64.Build.0 = Win8 Debug|x64
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Debug|x64.Deploy.0 = Win8 Debug|x64
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Release|Win32.ActiveCfg = Win8 Release|Win32
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Release|Win32.Build.0 = Win8 Release|Win32
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Release|Win32.Deploy.0 = Win8 Release|Win32
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Release|x64.ActiveCfg = Win8 Release|x64
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Release|x64.Build.0 = Win8 Release|x64
|
||||
{B8C04B51-4207-491D-A7DD-C54861E8B528}.Win8 Release|x64.Deploy.0 = Win8 Release|x64
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
80
qxldod/BaseObject.cpp
Executable file
80
qxldod/BaseObject.cpp
Executable file
@ -0,0 +1,80 @@
|
||||
#include "BaseObject.h"
|
||||
|
||||
#pragma code_seg("PAGE")
|
||||
|
||||
#define QXLTAG 'LXQd'
|
||||
|
||||
//
|
||||
// New and delete operators
|
||||
//
|
||||
_When_((PoolType & NonPagedPoolMustSucceed) != 0,
|
||||
__drv_reportError("Must succeed pool allocations are forbidden. "
|
||||
"Allocation failures cause a system crash"))
|
||||
void* __cdecl operator new(size_t Size, POOL_TYPE PoolType)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
Size = (Size != 0) ? Size : 1;
|
||||
|
||||
void* pObject = ExAllocatePoolWithTag(PoolType, Size, QXLTAG);
|
||||
|
||||
#if DBG
|
||||
if (pObject != NULL)
|
||||
{
|
||||
RtlFillMemory(pObject, Size, 0xCD);
|
||||
}
|
||||
#endif // DBG
|
||||
|
||||
return pObject;
|
||||
}
|
||||
|
||||
_When_((PoolType & NonPagedPoolMustSucceed) != 0,
|
||||
__drv_reportError("Must succeed pool allocations are forbidden. "
|
||||
"Allocation failures cause a system crash"))
|
||||
void* __cdecl operator new[](size_t Size, POOL_TYPE PoolType)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
Size = (Size != 0) ? Size : 1;
|
||||
|
||||
void* pObject = ExAllocatePoolWithTag(PoolType, Size, QXLTAG);
|
||||
|
||||
#if DBG
|
||||
if (pObject != NULL)
|
||||
{
|
||||
RtlFillMemory(pObject, Size, 0xCD);
|
||||
}
|
||||
#endif // DBG
|
||||
|
||||
return pObject;
|
||||
}
|
||||
|
||||
void __cdecl operator delete(void* pObject)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
if (pObject != NULL)
|
||||
{
|
||||
ExFreePool(pObject);
|
||||
}
|
||||
}
|
||||
|
||||
void __cdecl operator delete[](void* pObject)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
if (pObject != NULL)
|
||||
{
|
||||
ExFreePool(pObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
BaseObject::BaseObject(void)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
BaseObject::~BaseObject(void)
|
||||
{
|
||||
}
|
70
qxldod/BaseObject.h
Executable file
70
qxldod/BaseObject.h
Executable file
@ -0,0 +1,70 @@
|
||||
#pragma once
|
||||
extern "C"
|
||||
{
|
||||
#define __CPLUSPLUS
|
||||
|
||||
// Standard C-runtime headers
|
||||
#include <stddef.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <initguid.h>
|
||||
|
||||
// NTOS headers
|
||||
#include <ntddk.h>
|
||||
|
||||
#ifndef FAR
|
||||
#define FAR
|
||||
#endif
|
||||
|
||||
// Windows headers
|
||||
#include <windef.h>
|
||||
#include <winerror.h>
|
||||
|
||||
// Windows GDI headers
|
||||
#include <wingdi.h>
|
||||
|
||||
// Windows DDI headers
|
||||
#include <winddi.h>
|
||||
#include <ntddvdeo.h>
|
||||
|
||||
#include <d3dkmddi.h>
|
||||
#include <d3dkmthk.h>
|
||||
|
||||
#include <ntstrsafe.h>
|
||||
#include <ntintsafe.h>
|
||||
|
||||
#include <dispmprt.h>
|
||||
};
|
||||
|
||||
//
|
||||
// Memory handling
|
||||
//
|
||||
|
||||
// Defaulting the value of PoolType means that any call to new Foo()
|
||||
// will raise a compiler error for being ambiguous. This is to help keep
|
||||
// any calls to allocate memory from accidentally NOT going through
|
||||
// these functions.
|
||||
_When_((PoolType & NonPagedPoolMustSucceed) != 0,
|
||||
__drv_reportError("Must succeed pool allocations are forbidden. "
|
||||
"Allocation failures cause a system crash"))
|
||||
void* __cdecl operator new(size_t Size, POOL_TYPE PoolType = PagedPool);
|
||||
_When_((PoolType & NonPagedPoolMustSucceed) != 0,
|
||||
__drv_reportError("Must succeed pool allocations are forbidden. "
|
||||
"Allocation failures cause a system crash"))
|
||||
void* __cdecl operator new[](size_t Size, POOL_TYPE PoolType = PagedPool);
|
||||
void __cdecl operator delete(void* pObject);
|
||||
void __cdecl operator delete[](void* pObject);
|
||||
|
||||
// Pool allocation tag for the Sample Display Driver. All allocations use this tag.
|
||||
|
||||
|
||||
class BaseObject
|
||||
{
|
||||
public:
|
||||
BaseObject(void);
|
||||
~BaseObject(void);
|
||||
};
|
||||
|
1074
qxldod/QxlDod.cpp
Executable file
1074
qxldod/QxlDod.cpp
Executable file
File diff suppressed because it is too large
Load Diff
236
qxldod/QxlDod.h
Executable file
236
qxldod/QxlDod.h
Executable file
@ -0,0 +1,236 @@
|
||||
#pragma once
|
||||
#include "baseobject.h"
|
||||
|
||||
typedef struct _QXL_FLAGS
|
||||
{
|
||||
UINT DriverStarted : 1; // ( 1) 1 after StartDevice and 0 after StopDevice
|
||||
UINT Unused : 31;
|
||||
} QXL_FLAGS;
|
||||
|
||||
#define MAX_CHILDREN 1
|
||||
#define MAX_VIEWS 1
|
||||
|
||||
#pragma pack(push)
|
||||
#pragma pack(1)
|
||||
|
||||
typedef struct
|
||||
{
|
||||
CHAR Signature[4];
|
||||
USHORT Version;
|
||||
ULONG OemStringPtr;
|
||||
LONG Capabilities;
|
||||
ULONG VideoModePtr;
|
||||
USHORT TotalMemory;
|
||||
USHORT OemSoftwareRevision;
|
||||
ULONG OemVendorNamePtr;
|
||||
ULONG OemProductNamePtr;
|
||||
ULONG OemProductRevPtr;
|
||||
CHAR Reserved[222];
|
||||
// CHAR OemData[256];
|
||||
} VBE_INFO, *PVBE_INFO;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* Mandatory information for all VBE revisions */
|
||||
USHORT ModeAttributes;
|
||||
UCHAR WinAAttributes;
|
||||
UCHAR WinBAttributes;
|
||||
USHORT WinGranularity;
|
||||
USHORT WinSize;
|
||||
USHORT WinASegment;
|
||||
USHORT WinBSegment;
|
||||
ULONG WinFuncPtr;
|
||||
USHORT BytesPerScanLine;
|
||||
/* Mandatory information for VBE 1.2 and above */
|
||||
USHORT XResolution;
|
||||
USHORT YResolution;
|
||||
UCHAR XCharSize;
|
||||
UCHAR YCharSize;
|
||||
UCHAR NumberOfPlanes;
|
||||
UCHAR BitsPerPixel;
|
||||
UCHAR NumberOfBanks;
|
||||
UCHAR MemoryModel;
|
||||
UCHAR BankSize;
|
||||
UCHAR NumberOfImagePages;
|
||||
UCHAR Reserved1;
|
||||
/* Direct Color fields (required for Direct/6 and YUV/7 memory models) */
|
||||
UCHAR RedMaskSize;
|
||||
UCHAR RedFieldPosition;
|
||||
UCHAR GreenMaskSize;
|
||||
UCHAR GreenFieldPosition;
|
||||
UCHAR BlueMaskSize;
|
||||
UCHAR BlueFieldPosition;
|
||||
UCHAR ReservedMaskSize;
|
||||
UCHAR ReservedFieldPosition;
|
||||
UCHAR DirectColorModeInfo;
|
||||
/* Mandatory information for VBE 2.0 and above */
|
||||
ULONG PhysBasePtr;
|
||||
ULONG Reserved2;
|
||||
USHORT Reserved3;
|
||||
/* Mandatory information for VBE 3.0 and above */
|
||||
USHORT LinBytesPerScanLine;
|
||||
UCHAR BnkNumberOfImagePages;
|
||||
UCHAR LinNumberOfImagePages;
|
||||
UCHAR LinRedMaskSize;
|
||||
UCHAR LinRedFieldPosition;
|
||||
UCHAR LinGreenMaskSize;
|
||||
UCHAR LinGreenFieldPosition;
|
||||
UCHAR LinBlueMaskSize;
|
||||
UCHAR LinBlueFieldPosition;
|
||||
UCHAR LinReservedMaskSize;
|
||||
UCHAR LinReservedFieldPosition;
|
||||
ULONG MaxPixelClock;
|
||||
CHAR Reserved4[189];
|
||||
} VBE_MODEINFO, *PVBE_MODEINFO;
|
||||
|
||||
#pragma pack(pop)
|
||||
|
||||
typedef struct _X86BIOS_REGISTERS // invented names
|
||||
{
|
||||
ULONG Eax;
|
||||
ULONG Ecx;
|
||||
ULONG Edx;
|
||||
ULONG Ebx;
|
||||
ULONG Ebp;
|
||||
ULONG Esi;
|
||||
ULONG Edi;
|
||||
USHORT SegDs;
|
||||
USHORT SegEs;
|
||||
} X86BIOS_REGISTERS, *PX86BIOS_REGISTERS;
|
||||
|
||||
/* Undocumented imports from the HAL */
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
NTHALAPI BOOLEAN x86BiosCall (ULONG, PX86BIOS_REGISTERS);
|
||||
|
||||
NTHALAPI NTSTATUS x86BiosAllocateBuffer (ULONG *, USHORT *, USHORT *);
|
||||
NTHALAPI NTSTATUS x86BiosFreeBuffer (USHORT, USHORT);
|
||||
|
||||
NTHALAPI NTSTATUS x86BiosReadMemory (USHORT, USHORT, PVOID, ULONG);
|
||||
NTHALAPI NTSTATUS x86BiosWriteMemory (USHORT, USHORT, PVOID, ULONG);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
class QxlDod :
|
||||
public BaseObject
|
||||
{
|
||||
private:
|
||||
DEVICE_OBJECT* m_pPhysicalDevice;
|
||||
DXGKRNL_INTERFACE m_DxgkInterface;
|
||||
DXGK_DEVICE_INFO m_DeviceInfo;
|
||||
|
||||
DEVICE_POWER_STATE m_MonitorPowerState;
|
||||
DEVICE_POWER_STATE m_AdapterPowerState;
|
||||
QXL_FLAGS m_Flags;
|
||||
PVBE_MODEINFO m_ModeInfo;
|
||||
ULONG m_ModeCount;
|
||||
PUSHORT m_ModeNumbers;
|
||||
USHORT m_CurrentMode;
|
||||
public:
|
||||
QxlDod(_In_ DEVICE_OBJECT* pPhysicalDeviceObject);
|
||||
~QxlDod(void);
|
||||
#pragma code_seg(push)
|
||||
#pragma code_seg()
|
||||
BOOLEAN IsDriverActive() const
|
||||
{
|
||||
return m_Flags.DriverStarted;
|
||||
}
|
||||
#pragma code_seg(pop)
|
||||
|
||||
NTSTATUS StartDevice(_In_ DXGK_START_INFO* pDxgkStartInfo,
|
||||
_In_ DXGKRNL_INTERFACE* pDxgkInterface,
|
||||
_Out_ ULONG* pNumberOfViews,
|
||||
_Out_ ULONG* pNumberOfChildren);
|
||||
NTSTATUS StopDevice(VOID);
|
||||
// Must be Non-Paged
|
||||
VOID ResetDevice(VOID);
|
||||
|
||||
NTSTATUS DispatchIoRequest(_In_ ULONG VidPnSourceId,
|
||||
_In_ VIDEO_REQUEST_PACKET* pVideoRequestPacket);
|
||||
NTSTATUS SetPowerState(_In_ ULONG HardwareUid,
|
||||
_In_ DEVICE_POWER_STATE DevicePowerState,
|
||||
_In_ POWER_ACTION ActionType);
|
||||
// Report back child capabilities
|
||||
NTSTATUS QueryChildRelations(_Out_writes_bytes_(ChildRelationsSize) DXGK_CHILD_DESCRIPTOR* pChildRelations,
|
||||
_In_ ULONG ChildRelationsSize);
|
||||
|
||||
NTSTATUS QueryChildStatus(_Inout_ DXGK_CHILD_STATUS* pChildStatus,
|
||||
_In_ BOOLEAN NonDestructiveOnly);
|
||||
|
||||
// Return EDID if previously retrieved
|
||||
NTSTATUS QueryDeviceDescriptor(_In_ ULONG ChildUid,
|
||||
_Inout_ DXGK_DEVICE_DESCRIPTOR* pDeviceDescriptor);
|
||||
|
||||
// Must be Non-Paged
|
||||
// BDD doesn't have interrupts, so just returns false
|
||||
BOOLEAN InterruptRoutine(_In_ ULONG MessageNumber);
|
||||
|
||||
VOID DpcRoutine(VOID);
|
||||
|
||||
// Return DriverCaps, doesn't support other queries though
|
||||
NTSTATUS QueryAdapterInfo(_In_ CONST DXGKARG_QUERYADAPTERINFO* pQueryAdapterInfo);
|
||||
|
||||
NTSTATUS SetPointerPosition(_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition);
|
||||
|
||||
NTSTATUS SetPointerShape(_In_ CONST DXGKARG_SETPOINTERSHAPE* pSetPointerShape);
|
||||
|
||||
NTSTATUS Escape(_In_ CONST DXGKARG_ESCAPE* pEscape);
|
||||
|
||||
NTSTATUS PresentDisplayOnly(_In_ CONST DXGKARG_PRESENT_DISPLAYONLY* pPresentDisplayOnly);
|
||||
|
||||
NTSTATUS QueryInterface(_In_ CONST PQUERY_INTERFACE QueryInterface);
|
||||
|
||||
NTSTATUS IsSupportedVidPn(_Inout_ DXGKARG_ISSUPPORTEDVIDPN* pIsSupportedVidPn);
|
||||
|
||||
NTSTATUS RecommendFunctionalVidPn(_In_ CONST DXGKARG_RECOMMENDFUNCTIONALVIDPN* CONST pRecommendFunctionalVidPn);
|
||||
|
||||
NTSTATUS RecommendVidPnTopology(_In_ CONST DXGKARG_RECOMMENDVIDPNTOPOLOGY* CONST pRecommendVidPnTopology);
|
||||
|
||||
NTSTATUS RecommendMonitorModes(_In_ CONST DXGKARG_RECOMMENDMONITORMODES* CONST pRecommendMonitorModes);
|
||||
|
||||
NTSTATUS EnumVidPnCofuncModality(_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* CONST pEnumCofuncModality);
|
||||
|
||||
NTSTATUS SetVidPnSourceVisibility(_In_ CONST DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility);
|
||||
|
||||
NTSTATUS CommitVidPn(_In_ CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPn);
|
||||
|
||||
NTSTATUS UpdateActiveVidPnPresentPath(_In_ CONST DXGKARG_UPDATEACTIVEVIDPNPRESENTPATH* CONST pUpdateActiveVidPnPresentPath);
|
||||
|
||||
NTSTATUS QueryVidPnHWCapability(_Inout_ DXGKARG_QUERYVIDPNHWCAPABILITY* pVidPnHWCaps);
|
||||
|
||||
// Part of PnPStop (PnP instance only), returns current mode information (which will be passed to fallback instance by dxgkrnl)
|
||||
NTSTATUS StopDeviceAndReleasePostDisplayOwnership(_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
|
||||
_Out_ DXGK_DISPLAY_INFORMATION* pDisplayInfo);
|
||||
|
||||
// Must be Non-Paged
|
||||
// Call to initialize as part of bugcheck
|
||||
NTSTATUS SystemDisplayEnable(_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
|
||||
_In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS Flags,
|
||||
_Out_ UINT* pWidth,
|
||||
_Out_ UINT* pHeight,
|
||||
_Out_ D3DDDIFORMAT* pColorFormat);
|
||||
|
||||
// Must be Non-Paged
|
||||
// Write out pixels as part of bugcheck
|
||||
VOID SystemDisplayWrite(_In_reads_bytes_(SourceHeight * SourceStride) VOID* pSource,
|
||||
_In_ UINT SourceWidth,
|
||||
_In_ UINT SourceHeight,
|
||||
_In_ UINT SourceStride,
|
||||
_In_ INT PositionX,
|
||||
_In_ INT PositionY);
|
||||
private:
|
||||
VOID CleanUp(VOID);
|
||||
NTSTATUS WriteHWInfoStr(_In_ HANDLE DevInstRegKeyHandle, _In_ PCWSTR pszwValueName, _In_ PCSTR pszValue);
|
||||
NTSTATUS RegisterHWInfo();
|
||||
NTSTATUS VbeGetModeList();
|
||||
NTSTATUS VbeQueryCurrentMode(PVIDEO_MODE RequestedMode);
|
||||
NTSTATUS VbeSetCurrentMode(PVIDEO_MODE RequestedMode);
|
||||
NTSTATUS VbeSetPowerState(POWER_ACTION ActionType);
|
||||
};
|
||||
|
676
qxldod/driver.cpp
Executable file
676
qxldod/driver.cpp
Executable file
@ -0,0 +1,676 @@
|
||||
#include "driver.h"
|
||||
#include "QxlDod.h"
|
||||
|
||||
#pragma code_seg(push)
|
||||
#pragma code_seg("INIT")
|
||||
// BEGIN: Init Code
|
||||
|
||||
//
|
||||
// Driver Entry point
|
||||
//
|
||||
|
||||
int nDebugLevel = TRACE_LEVEL_VERBOSE;
|
||||
|
||||
|
||||
extern "C"
|
||||
NTSTATUS
|
||||
DriverEntry(
|
||||
_In_ DRIVER_OBJECT* pDriverObject,
|
||||
_In_ UNICODE_STRING* pRegistryPath)
|
||||
{
|
||||
PAGED_CODE();
|
||||
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> KMDOD build on on %s %s\n", __DATE__, __TIME__));
|
||||
|
||||
#ifdef DBG
|
||||
// KdBreakPoint();
|
||||
#endif
|
||||
// Initialize DDI function pointers and dxgkrnl
|
||||
KMDDOD_INITIALIZATION_DATA InitialData = {0};
|
||||
|
||||
InitialData.Version = DXGKDDI_INTERFACE_VERSION_WIN8;
|
||||
|
||||
InitialData.DxgkDdiAddDevice = DodAddDevice;
|
||||
InitialData.DxgkDdiStartDevice = DodStartDevice;
|
||||
InitialData.DxgkDdiStopDevice = DodStopDevice;
|
||||
InitialData.DxgkDdiResetDevice = DodResetDevice;
|
||||
InitialData.DxgkDdiRemoveDevice = DodRemoveDevice;
|
||||
InitialData.DxgkDdiDispatchIoRequest = DodDispatchIoRequest;
|
||||
InitialData.DxgkDdiInterruptRoutine = DodInterruptRoutine;
|
||||
InitialData.DxgkDdiDpcRoutine = DodDpcRoutine;
|
||||
InitialData.DxgkDdiQueryChildRelations = DodQueryChildRelations;
|
||||
InitialData.DxgkDdiQueryChildStatus = DodQueryChildStatus;
|
||||
InitialData.DxgkDdiQueryDeviceDescriptor = DodQueryDeviceDescriptor;
|
||||
InitialData.DxgkDdiSetPowerState = DodSetPowerState;
|
||||
InitialData.DxgkDdiUnload = DodUnload;
|
||||
InitialData.DxgkDdiQueryInterface = DodQueryInterface;
|
||||
InitialData.DxgkDdiQueryAdapterInfo = DodQueryAdapterInfo;
|
||||
InitialData.DxgkDdiSetPointerPosition = DodSetPointerPosition;
|
||||
InitialData.DxgkDdiSetPointerShape = DodSetPointerShape;
|
||||
InitialData.DxgkDdiEscape = DodEscape;
|
||||
InitialData.DxgkDdiIsSupportedVidPn = DodIsSupportedVidPn;
|
||||
InitialData.DxgkDdiRecommendFunctionalVidPn = DodRecommendFunctionalVidPn;
|
||||
InitialData.DxgkDdiEnumVidPnCofuncModality = DodEnumVidPnCofuncModality;
|
||||
InitialData.DxgkDdiSetVidPnSourceVisibility = DodSetVidPnSourceVisibility;
|
||||
InitialData.DxgkDdiCommitVidPn = DodCommitVidPn;
|
||||
InitialData.DxgkDdiUpdateActiveVidPnPresentPath = DodUpdateActiveVidPnPresentPath;
|
||||
InitialData.DxgkDdiRecommendMonitorModes = DodRecommendMonitorModes;
|
||||
InitialData.DxgkDdiQueryVidPnHWCapability = DodQueryVidPnHWCapability;
|
||||
InitialData.DxgkDdiPresentDisplayOnly = DodPresentDisplayOnly;
|
||||
InitialData.DxgkDdiStopDeviceAndReleasePostDisplayOwnership = DodStopDeviceAndReleasePostDisplayOwnership;
|
||||
InitialData.DxgkDdiSystemDisplayEnable = DodSystemDisplayEnable;
|
||||
InitialData.DxgkDdiSystemDisplayWrite = DodSystemDisplayWrite;
|
||||
|
||||
NTSTATUS Status = DxgkInitializeDisplayOnlyDriver(pDriverObject, pRegistryPath, &InitialData);
|
||||
if (!NT_SUCCESS(Status))
|
||||
{
|
||||
DbgPrint(TRACE_LEVEL_ERROR, ("DxgkInitializeDisplayOnlyDriver failed with Status: 0x%X\n", Status));
|
||||
}
|
||||
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
|
||||
return Status;
|
||||
}
|
||||
// END: Init Code
|
||||
#pragma code_seg(pop)
|
||||
|
||||
#pragma code_seg(push)
|
||||
#pragma code_seg("PAGE")
|
||||
|
||||
//
|
||||
// PnP DDIs
|
||||
//
|
||||
|
||||
VOID
|
||||
DodUnload(VOID)
|
||||
{
|
||||
PAGED_CODE();
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--> %s\n", __FUNCTION__));
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodAddDevice(
|
||||
_In_ DEVICE_OBJECT* pPhysicalDeviceObject,
|
||||
_Outptr_ PVOID* ppDeviceContext)
|
||||
{
|
||||
PAGED_CODE();
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s\n", __FUNCTION__));
|
||||
|
||||
if ((pPhysicalDeviceObject == NULL) ||
|
||||
(ppDeviceContext == NULL))
|
||||
{
|
||||
DbgPrint(TRACE_LEVEL_ERROR, ("One of pPhysicalDeviceObject (0x%I64x), ppDeviceContext (0x%I64x) is NULL",
|
||||
pPhysicalDeviceObject, ppDeviceContext));
|
||||
return STATUS_INVALID_PARAMETER;
|
||||
}
|
||||
*ppDeviceContext = NULL;
|
||||
|
||||
QxlDod* pQxl = new(NonPagedPoolNx) QxlDod(pPhysicalDeviceObject);
|
||||
if (pQxl == NULL)
|
||||
{
|
||||
DbgPrint(TRACE_LEVEL_ERROR, ("pQxl failed to be allocated"));
|
||||
return STATUS_NO_MEMORY;
|
||||
}
|
||||
|
||||
*ppDeviceContext = pQxl;
|
||||
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodRemoveDevice(
|
||||
_In_ VOID* pDeviceContext)
|
||||
{
|
||||
PAGED_CODE();
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
|
||||
if (pQxl)
|
||||
{
|
||||
delete pQxl;
|
||||
pQxl = NULL;
|
||||
}
|
||||
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodStartDevice(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ DXGK_START_INFO* pDxgkStartInfo,
|
||||
_In_ DXGKRNL_INTERFACE* pDxgkInterface,
|
||||
_Out_ ULONG* pNumberOfViews,
|
||||
_Out_ ULONG* pNumberOfChildren)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->StartDevice(pDxgkStartInfo, pDxgkInterface, pNumberOfViews, pNumberOfChildren);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodStopDevice(
|
||||
_In_ VOID* pDeviceContext)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->StopDevice();
|
||||
}
|
||||
|
||||
|
||||
NTSTATUS
|
||||
DodDispatchIoRequest(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG VidPnSourceId,
|
||||
_In_ VIDEO_REQUEST_PACKET* pVideoRequestPacket)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->DispatchIoRequest(VidPnSourceId, pVideoRequestPacket);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodSetPowerState(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG HardwareUid,
|
||||
_In_ DEVICE_POWER_STATE DevicePowerState,
|
||||
_In_ POWER_ACTION ActionType)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
// If the driver isn't active, SetPowerState can still be called, however in QXL's case
|
||||
// this shouldn't do anything, as it could for instance be called on QXL Fallback after
|
||||
// Fallback has been stopped and QXL PnP is being started. Fallback doesn't have control
|
||||
// of the hardware in this case.
|
||||
return STATUS_SUCCESS;
|
||||
}
|
||||
return pQxl->SetPowerState(HardwareUid, DevicePowerState, ActionType);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodQueryChildRelations(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_Out_writes_bytes_(ChildRelationsSize) DXGK_CHILD_DESCRIPTOR* pChildRelations,
|
||||
_In_ ULONG ChildRelationsSize)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->QueryChildRelations(pChildRelations, ChildRelationsSize);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodQueryChildStatus(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_Inout_ DXGK_CHILD_STATUS* pChildStatus,
|
||||
_In_ BOOLEAN NonDestructiveOnly)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->QueryChildStatus(pChildStatus, NonDestructiveOnly);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodQueryDeviceDescriptor(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG ChildUid,
|
||||
_Inout_ DXGK_DEVICE_DESCRIPTOR* pDeviceDescriptor)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
// During stress testing of PnPStop, it is possible for QXL Fallback to get called to start then stop in quick succession.
|
||||
// The first call queues a worker thread item indicating that it now has a child device, the second queues a worker thread
|
||||
// item that it no longer has any child device. This function gets called based on the first worker thread item, but after
|
||||
// the driver has been stopped. Therefore instead of asserting like other functions, we only warn.
|
||||
DbgPrint(TRACE_LEVEL_WARNING, ("QXL (0x%I64x) is being called when not active!", pQxl));
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->QueryDeviceDescriptor(ChildUid, pDeviceDescriptor);
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// WDDM Display Only Driver DDIs
|
||||
//
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodQueryAdapterInfo(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_QUERYADAPTERINFO* pQueryAdapterInfo)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
return pQxl->QueryAdapterInfo(pQueryAdapterInfo);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSetPointerPosition(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->SetPointerPosition(pSetPointerPosition);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSetPointerShape(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_SETPOINTERSHAPE* pSetPointerShape)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->SetPointerShape(pSetPointerShape);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodEscape(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_ESCAPE* pEscape
|
||||
)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
return pQxl->Escape(pEscape);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
DodQueryInterface(
|
||||
_In_ CONST PVOID pDeviceContext,
|
||||
_In_ CONST PQUERY_INTERFACE QueryInterface
|
||||
)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->QueryInterface(QueryInterface);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodPresentDisplayOnly(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_PRESENT_DISPLAYONLY* pPresentDisplayOnly)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
// DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->PresentDisplayOnly(pPresentDisplayOnly);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodStopDeviceAndReleasePostDisplayOwnership(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
|
||||
_Out_ DXGK_DISPLAY_INFORMATION* DisplayInfo)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->StopDeviceAndReleasePostDisplayOwnership(TargetId, DisplayInfo);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodIsSupportedVidPn(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_Inout_ DXGKARG_ISSUPPORTEDVIDPN* pIsSupportedVidPn)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
// This path might hit because win32k/dxgport doesn't check that an adapter is active when taking the adapter lock.
|
||||
// The adapter lock is the main thing QXL Fallback relies on to not be called while it's inactive. It is still a rare
|
||||
// timing issue around PnpStart/Stop and isn't expected to have any effect on the stability of the system.
|
||||
DbgPrint(TRACE_LEVEL_WARNING, ("QXL (0x%I64x) is being called when not active!", pQxl));
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->IsSupportedVidPn(pIsSupportedVidPn);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodRecommendFunctionalVidPn(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_RECOMMENDFUNCTIONALVIDPN* CONST pRecommendFunctionalVidPn)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->RecommendFunctionalVidPn(pRecommendFunctionalVidPn);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodRecommendVidPnTopology(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_RECOMMENDVIDPNTOPOLOGY* CONST pRecommendVidPnTopology)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->RecommendVidPnTopology(pRecommendVidPnTopology);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodRecommendMonitorModes(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_RECOMMENDMONITORMODES* CONST pRecommendMonitorModes)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->RecommendMonitorModes(pRecommendMonitorModes);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodEnumVidPnCofuncModality(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* CONST pEnumCofuncModality)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->EnumVidPnCofuncModality(pEnumCofuncModality);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSetVidPnSourceVisibility(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->SetVidPnSourceVisibility(pSetVidPnSourceVisibility);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodCommitVidPn(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPn)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->CommitVidPn(pCommitVidPn);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodUpdateActiveVidPnPresentPath(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_UPDATEACTIVEVIDPNPRESENTPATH* CONST pUpdateActiveVidPnPresentPath)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->UpdateActiveVidPnPresentPath(pUpdateActiveVidPnPresentPath);
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodQueryVidPnHWCapability(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_Inout_ DXGKARG_QUERYVIDPNHWCAPABILITY* pVidPnHWCaps)
|
||||
{
|
||||
PAGED_CODE();
|
||||
QXL_ASSERT_CHK(hAdapter != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(hAdapter);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return STATUS_UNSUCCESSFUL;
|
||||
}
|
||||
return pQxl->QueryVidPnHWCapability(pVidPnHWCaps);
|
||||
}
|
||||
|
||||
//END: Paged Code
|
||||
#pragma code_seg(pop)
|
||||
|
||||
#pragma code_seg(push)
|
||||
#pragma code_seg()
|
||||
// BEGIN: Non-Paged Code
|
||||
|
||||
VOID
|
||||
DodDpcRoutine(
|
||||
_In_ VOID* pDeviceContext)
|
||||
{
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
if (!pQxl->IsDriverActive())
|
||||
{
|
||||
QXL_LOG_ASSERTION1("QXL (0x%I64x) is being called when not active!", pQxl);
|
||||
return;
|
||||
}
|
||||
pQxl->DpcRoutine();
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<--- %s\n", __FUNCTION__));
|
||||
}
|
||||
|
||||
BOOLEAN
|
||||
DodInterruptRoutine(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG MessageNumber)
|
||||
{
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->InterruptRoutine(MessageNumber);
|
||||
}
|
||||
|
||||
VOID
|
||||
DodResetDevice(
|
||||
_In_ VOID* pDeviceContext)
|
||||
{
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
pQxl->ResetDevice();
|
||||
}
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSystemDisplayEnable(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
|
||||
_In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS Flags,
|
||||
_Out_ UINT* Width,
|
||||
_Out_ UINT* Height,
|
||||
_Out_ D3DDDIFORMAT* ColorFormat)
|
||||
{
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
return pQxl->SystemDisplayEnable(TargetId, Flags, Width, Height, ColorFormat);
|
||||
}
|
||||
|
||||
VOID
|
||||
APIENTRY
|
||||
DodSystemDisplayWrite(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ VOID* Source,
|
||||
_In_ UINT SourceWidth,
|
||||
_In_ UINT SourceHeight,
|
||||
_In_ UINT SourceStride,
|
||||
_In_ UINT PositionX,
|
||||
_In_ UINT PositionY)
|
||||
{
|
||||
QXL_ASSERT_CHK(pDeviceContext != NULL);
|
||||
DbgPrint(TRACE_LEVEL_INFORMATION, ("<---> %s\n", __FUNCTION__));
|
||||
|
||||
QxlDod* pQxl = reinterpret_cast<QxlDod*>(pDeviceContext);
|
||||
pQxl->SystemDisplayWrite(Source, SourceWidth, SourceHeight, SourceStride, PositionX, PositionY);
|
||||
}
|
||||
|
||||
#if defined(DBG)
|
||||
|
||||
#define RHEL_DEBUG_PORT ((PUCHAR)0x3F8)
|
||||
#define TEMP_BUFFER_SIZE 256
|
||||
|
||||
void DebugPrintFuncSerial(const char *format, ...)
|
||||
{
|
||||
char buf[TEMP_BUFFER_SIZE];
|
||||
NTSTATUS status;
|
||||
size_t len;
|
||||
va_list list;
|
||||
va_start(list, format);
|
||||
status = RtlStringCbVPrintfA(buf, sizeof(buf), format, list);
|
||||
if (status == STATUS_SUCCESS)
|
||||
{
|
||||
len = strlen(buf);
|
||||
}
|
||||
else
|
||||
{
|
||||
len = 2;
|
||||
buf[0] = 'O';
|
||||
buf[1] = '\n';
|
||||
}
|
||||
if (len)
|
||||
{
|
||||
WRITE_PORT_BUFFER_UCHAR(RHEL_DEBUG_PORT, (PUCHAR)buf, len);
|
||||
WRITE_PORT_UCHAR(RHEL_DEBUG_PORT, '\r');
|
||||
}
|
||||
}
|
||||
|
||||
void DebugPrintFunc(const char *format, ...)
|
||||
{
|
||||
va_list list;
|
||||
va_start(list, format);
|
||||
vDbgPrintEx(DPFLTR_DEFAULT_ID, 9 | DPFLTR_MASK, format, list);
|
||||
}
|
||||
#endif
|
||||
|
||||
#pragma code_seg(pop) // End Non-Paged Code
|
||||
|
255
qxldod/driver.h
Executable file
255
qxldod/driver.h
Executable file
@ -0,0 +1,255 @@
|
||||
#pragma once
|
||||
#include "BaseObject.h"
|
||||
|
||||
|
||||
extern "C"
|
||||
DRIVER_INITIALIZE DriverEntry;
|
||||
|
||||
//
|
||||
// PnP DDIs
|
||||
//
|
||||
|
||||
VOID
|
||||
DodUnload(VOID);
|
||||
|
||||
// If uncommenting ENABLE_DXGK_SAL in the sources file, all the below function prototypes should be updated to use
|
||||
// the function typedef's from the header files. Additionally, annotations on the function definitions can be removed
|
||||
// as they are inherited from the prototype definition here. As an example the entire 4-line prototype for BddDdiAddDevice
|
||||
// is replaced by the single commented line below:
|
||||
// DXGKDDI_ADD_DEVICE BddDdiAddDevice;
|
||||
NTSTATUS
|
||||
DodAddDevice(
|
||||
_In_ DEVICE_OBJECT* pPhysicalDeviceObject,
|
||||
_Outptr_ PVOID* ppDeviceContext);
|
||||
|
||||
NTSTATUS
|
||||
DodRemoveDevice(
|
||||
_In_ VOID* pDeviceContext);
|
||||
|
||||
NTSTATUS
|
||||
DodStartDevice(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ DXGK_START_INFO* pDxgkStartInfo,
|
||||
_In_ DXGKRNL_INTERFACE* pDxgkInterface,
|
||||
_Out_ ULONG* pNumberOfViews,
|
||||
_Out_ ULONG* pNumberOfChildren);
|
||||
|
||||
NTSTATUS
|
||||
DodStopDevice(
|
||||
_In_ VOID* pDeviceContext);
|
||||
|
||||
VOID
|
||||
DodResetDevice(
|
||||
_In_ VOID* pDeviceContext);
|
||||
|
||||
|
||||
NTSTATUS
|
||||
DodDispatchIoRequest(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG VidPnSourceId,
|
||||
_In_ VIDEO_REQUEST_PACKET* pVideoRequestPacket);
|
||||
|
||||
NTSTATUS
|
||||
DodSetPowerState(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG HardwareUid,
|
||||
_In_ DEVICE_POWER_STATE DevicePowerState,
|
||||
_In_ POWER_ACTION ActionType);
|
||||
|
||||
NTSTATUS
|
||||
DodQueryChildRelations(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_Out_writes_bytes_(ChildRelationsSize) DXGK_CHILD_DESCRIPTOR* pChildRelations,
|
||||
_In_ ULONG ChildRelationsSize);
|
||||
|
||||
NTSTATUS
|
||||
DodQueryChildStatus(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_Inout_ DXGK_CHILD_STATUS* pChildStatus,
|
||||
_In_ BOOLEAN NonDestructiveOnly);
|
||||
|
||||
NTSTATUS
|
||||
DodQueryDeviceDescriptor(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG ChildUid,
|
||||
_Inout_ DXGK_DEVICE_DESCRIPTOR* pDeviceDescriptor);
|
||||
|
||||
// Must be Non-Paged
|
||||
BOOLEAN
|
||||
DodInterruptRoutine(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ ULONG MessageNumber);
|
||||
|
||||
VOID
|
||||
DodDpcRoutine(
|
||||
_In_ VOID* pDeviceContext);
|
||||
|
||||
//
|
||||
// WDDM Display Only Driver DDIs
|
||||
//
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodQueryAdapterInfo(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_QUERYADAPTERINFO* pQueryAdapterInfo);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSetPointerPosition(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_SETPOINTERPOSITION* pSetPointerPosition);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSetPointerShape(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_SETPOINTERSHAPE* pSetPointerShape);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodEscape(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_ESCAPE* pEscape);
|
||||
|
||||
NTSTATUS
|
||||
DodQueryInterface(
|
||||
_In_ CONST PVOID pDeviceContext,
|
||||
_In_ CONST PQUERY_INTERFACE pQueryInterface);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodPresentDisplayOnly(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_PRESENT_DISPLAYONLY* pPresentDisplayOnly);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodIsSupportedVidPn(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_Inout_ DXGKARG_ISSUPPORTEDVIDPN* pIsSupportedVidPn);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodRecommendFunctionalVidPn(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_RECOMMENDFUNCTIONALVIDPN* CONST pRecommendFunctionalVidPn);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodRecommendVidPnTopology(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_RECOMMENDVIDPNTOPOLOGY* CONST pRecommendVidPnTopology);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodRecommendMonitorModes(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_RECOMMENDMONITORMODES* CONST pRecommendMonitorModes);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodEnumVidPnCofuncModality(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_ENUMVIDPNCOFUNCMODALITY* CONST pEnumCofuncModality);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSetVidPnSourceVisibility(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_SETVIDPNSOURCEVISIBILITY* pSetVidPnSourceVisibility);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodCommitVidPn(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_COMMITVIDPN* CONST pCommitVidPn);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodUpdateActiveVidPnPresentPath(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_In_ CONST DXGKARG_UPDATEACTIVEVIDPNPRESENTPATH* CONST pUpdateActiveVidPnPresentPath);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodQueryVidPnHWCapability(
|
||||
_In_ CONST HANDLE hAdapter,
|
||||
_Inout_ DXGKARG_QUERYVIDPNHWCAPABILITY* pVidPnHWCaps);
|
||||
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodStopDeviceAndReleasePostDisplayOwnership(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
|
||||
_Out_ DXGK_DISPLAY_INFORMATION* DisplayInfo);
|
||||
|
||||
// Must be Non-Paged
|
||||
NTSTATUS
|
||||
APIENTRY
|
||||
DodSystemDisplayEnable(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ D3DDDI_VIDEO_PRESENT_TARGET_ID TargetId,
|
||||
_In_ PDXGKARG_SYSTEM_DISPLAY_ENABLE_FLAGS Flags,
|
||||
_Out_ UINT* Width,
|
||||
_Out_ UINT* Height,
|
||||
_Out_ D3DDDIFORMAT* ColorFormat);
|
||||
|
||||
// Must be Non-Paged
|
||||
VOID
|
||||
APIENTRY
|
||||
DodSystemDisplayWrite(
|
||||
_In_ VOID* pDeviceContext,
|
||||
_In_ VOID* Source,
|
||||
_In_ UINT SourceWidth,
|
||||
_In_ UINT SourceHeight,
|
||||
_In_ UINT SourceStride,
|
||||
_In_ UINT PositionX,
|
||||
_In_ UINT PositionY);
|
||||
|
||||
|
||||
|
||||
#if DBG
|
||||
|
||||
extern int nDebugLevel;
|
||||
void DebugPrintFuncSerial(const char *format, ...);
|
||||
|
||||
void DebugPrintFunc(const char *format, ...);
|
||||
|
||||
#define DbgPrint(level, line) \
|
||||
if (level > nDebugLevel) {} \
|
||||
else DebugPrintFuncSerial line
|
||||
#else
|
||||
#define DbgPrint(level, line)
|
||||
#endif
|
||||
|
||||
// else if (0) DebugPrintFuncSerial line \
|
||||
|
||||
|
||||
#ifndef TRACE_LEVEL_INFORMATION
|
||||
#define TRACE_LEVEL_NONE 0 // Tracing is not on
|
||||
#define TRACE_LEVEL_FATAL 1 // Abnormal exit or termination
|
||||
#define TRACE_LEVEL_ERROR 2 // Severe errors that need logging
|
||||
#define TRACE_LEVEL_WARNING 3 // Warnings such as allocation failure
|
||||
#define TRACE_LEVEL_INFORMATION 4 // Includes non-error cases(e.g.,Entry-Exit)
|
||||
#define TRACE_LEVEL_VERBOSE 5 // Detailed traces from intermediate steps
|
||||
#define TRACE_LEVEL_RESERVED6 6
|
||||
#define TRACE_LEVEL_RESERVED7 7
|
||||
#define TRACE_LEVEL_RESERVED8 8
|
||||
#define TRACE_LEVEL_RESERVED9 9
|
||||
#endif // TRACE_LEVEL_INFORMATION
|
||||
|
||||
#define QXL_LOG_ASSERTION0(Msg) NT_ASSERT(FALSE)
|
||||
#define QXL_LOG_ASSERTION1(Msg,Param1) NT_ASSERT(FALSE)
|
||||
#define QXL_LOG_ASSERTION2(Msg,Param1,Param2) NT_ASSERT(FALSE)
|
||||
#define QXL_LOG_ASSERTION3(Msg,Param1,Param2,Param3) NT_ASSERT(FALSE)
|
||||
#define QXL_LOG_ASSERTION4(Msg,Param1,Param2,Param3,Param4) NT_ASSERT(FALSE)
|
||||
#define QXL_LOG_ASSERTION5(Msg,Param1,Param2,Param3,Param4,Param5) NT_ASSERT(FALSE)
|
||||
#define QXL_ASSERT(exp) {if (!(exp)) {QXL_LOG_ASSERTION0(#exp);}}
|
||||
|
||||
|
||||
#if DBG
|
||||
#define QXL_ASSERT_CHK(exp) QXL_ASSERT(exp)
|
||||
#else
|
||||
#define QXL_ASSERT_CHK(exp) {}
|
||||
#endif
|
BIN
qxldod/qxldod.inf
Executable file
BIN
qxldod/qxldod.inf
Executable file
Binary file not shown.
BIN
qxldod/qxldod.rc
Executable file
BIN
qxldod/qxldod.rc
Executable file
Binary file not shown.
288
qxldod/qxldod.vcxproj
Executable file
288
qxldod/qxldod.vcxproj
Executable file
@ -0,0 +1,288 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup Label="ProjectConfigurations">
|
||||
<ProjectConfiguration Include="Win8 Debug|Win32">
|
||||
<Configuration>Win8 Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win8 Release|Win32">
|
||||
<Configuration>Win8 Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Debug|Win32">
|
||||
<Configuration>Win7 Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Release|Win32">
|
||||
<Configuration>Win7 Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Debug|Win32">
|
||||
<Configuration>Vista Debug</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Release|Win32">
|
||||
<Configuration>Vista Release</Configuration>
|
||||
<Platform>Win32</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win8 Debug|x64">
|
||||
<Configuration>Win8 Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win8 Release|x64">
|
||||
<Configuration>Win8 Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Debug|x64">
|
||||
<Configuration>Win7 Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Win7 Release|x64">
|
||||
<Configuration>Win7 Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Debug|x64">
|
||||
<Configuration>Vista Debug</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
<ProjectConfiguration Include="Vista Release|x64">
|
||||
<Configuration>Vista Release</Configuration>
|
||||
<Platform>x64</Platform>
|
||||
</ProjectConfiguration>
|
||||
</ItemGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<ProjectGuid>{A6F48FC7-97E9-48EC-BCDF-1E4F9B43AADD}</ProjectGuid>
|
||||
<TemplateGuid>{dd38f7fc-d7bd-488b-9242-7d8754cde80d}</TemplateGuid>
|
||||
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
|
||||
<MinimumVisualStudioVersion>11.0</MinimumVisualStudioVersion>
|
||||
<Configuration>Win8 Debug</Configuration>
|
||||
<Platform Condition="'$(Platform)' == ''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="Globals">
|
||||
<RootNamespace>qxldod</RootNamespace>
|
||||
<VCTargetsPath Condition="'$(VCTargetsPath11)' != '' and '$(VisualStudioVersion)' == '11.0'">$(VCTargetsPath11)</VCTargetsPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Label="PropertySheets">
|
||||
<PlatformToolset>WindowsKernelModeDriver8.0</PlatformToolset>
|
||||
<ConfigurationType>Driver</ConfigurationType>
|
||||
<DriverType>WDM</DriverType>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows8</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'" Label="Configuration">
|
||||
<TargetVersion>Windows7</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>true</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'" Label="Configuration">
|
||||
<TargetVersion>Vista</TargetVersion>
|
||||
<UseDebugLibraries>false</UseDebugLibraries>
|
||||
</PropertyGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
|
||||
<ImportGroup Label="ExtensionSettings">
|
||||
</ImportGroup>
|
||||
<ImportGroup Label="PropertySheets">
|
||||
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
|
||||
</ImportGroup>
|
||||
<PropertyGroup Label="UserMacros" />
|
||||
<PropertyGroup />
|
||||
<PropertyGroup>
|
||||
<DebuggerFlavor>DbgengKernelDebugger</DebuggerFlavor>
|
||||
</PropertyGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>%(AdditionalDependencies);$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
<WarningLevel>Level3</WarningLevel>
|
||||
<ExceptionHandling />
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|Win32'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Vista Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Debug|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win7 Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Win8 Release|x64'">
|
||||
<Link>
|
||||
<AdditionalDependencies>;$(DDK_LIB_PATH)\displib.lib;$(DDK_LIB_PATH)\ntoskrnl.lib;$(DDK_LIB_PATH)\hal.lib</AdditionalDependencies>
|
||||
</Link>
|
||||
<ResourceCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ResourceCompile>
|
||||
<ClCompile>
|
||||
<AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(DDK_INC_PATH);$(SDK_INC_PATH)</AdditionalIncludeDirectories>
|
||||
</ClCompile>
|
||||
</ItemDefinitionGroup>
|
||||
<ItemGroup>
|
||||
<Inf Include="qxldod.inf" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FilesToPackage Include="$(TargetPath)" />
|
||||
<FilesToPackage Include="@(Inf->'%(CopyOutput)')" Condition="'@(Inf)'!=''" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="BaseObject.h" />
|
||||
<ClInclude Include="driver.h" />
|
||||
<ClInclude Include="QxlDod.h" />
|
||||
<ClInclude Include="resource.h" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BaseObject.cpp" />
|
||||
<ClCompile Include="driver.cpp" />
|
||||
<ClCompile Include="QxlDod.cpp" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="qxldod.rc" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
</ImportGroup>
|
||||
</Project>
|
56
qxldod/qxldod.vcxproj.filters
Executable file
56
qxldod/qxldod.vcxproj.filters
Executable file
@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<ItemGroup>
|
||||
<Filter Include="Source Files">
|
||||
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
|
||||
<Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Header Files">
|
||||
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
|
||||
<Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Resource Files">
|
||||
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
|
||||
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
|
||||
</Filter>
|
||||
<Filter Include="Driver Files">
|
||||
<UniqueIdentifier>{8E41214B-6785-4CFE-B992-037D68949A14}</UniqueIdentifier>
|
||||
<Extensions>inf;inv;inx;mof;mc;</Extensions>
|
||||
</Filter>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Inf Include="qxldod.inf">
|
||||
<Filter>Driver Files</Filter>
|
||||
</Inf>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClInclude Include="BaseObject.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="resource.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="driver.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="QxlDod.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ClCompile Include="BaseObject.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="driver.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="QxlDod.cpp">
|
||||
<Filter>Source Files</Filter>
|
||||
</ClCompile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ResourceCompile Include="qxldod.rc">
|
||||
<Filter>Resource Files</Filter>
|
||||
</ResourceCompile>
|
||||
</ItemGroup>
|
||||
</Project>
|
14
qxldod/resource.h
Executable file
14
qxldod/resource.h
Executable file
@ -0,0 +1,14 @@
|
||||
//{{NO_DEPENDENCIES}}
|
||||
// Microsoft Visual C++ generated include file.
|
||||
// Used by qxldod.rc
|
||||
|
||||
// Next default values for new objects
|
||||
//
|
||||
#ifdef APSTUDIO_INVOKED
|
||||
#ifndef APSTUDIO_READONLY_SYMBOLS
|
||||
#define _APS_NEXT_RESOURCE_VALUE 101
|
||||
#define _APS_NEXT_COMMAND_VALUE 40001
|
||||
#define _APS_NEXT_CONTROL_VALUE 1001
|
||||
#define _APS_NEXT_SYMED_VALUE 101
|
||||
#endif
|
||||
#endif
|
Loading…
Reference in New Issue
Block a user