From: Ron Rondis Ron on
Hi,

I'm developing a WDDM driver, currently I have skeleton user mode
and miniport drivers.

After installation and rebooting on Win7 I'm getting the following
call sequence.

DriverEntry
DxgkDdiAddDevice
DxgkDdiQueryInterface {2564aa4f-dddb-4495-b497-6ad4a84163d7} I2C
DxgkDdiQueryInterface {bf4672de-6b4e-4be4-a325-68a91ea49c9} OPM
DxgkDdiStartDevice
DxgkDdiQueryChildRelations
DxgkDdiStopDevice
DxgkDdiRemoveDevice
DxgkDdiUnload

I can't see any debug message that clarify the reason for choosing to
use the VGA driver instead of my WDDM driver (I'm enabling VIDEOPORT,
VIDEO, IHVVIDEO, and DEFAUL debug output).

*Device status in Device Manager show error code 43

What can be the reason for such a behavior?



---- Following is detailed description of current implementation ----


The user mode driver export OpenAdapter (current imp call OutputDebugString
and return E_OUTOFMEMORY). I also call OutputDebugString in DllMain.

The miniport DriverEntry assign valid functions pointers to all members of
DRIVER_INITALIZATION_DATA except DxgkDdiLinkDevice. Most of the functions
just call DbgPrintEx and return STATUS_UNSUCCESSFUL.

The following functions have different implementation than what has been
described in the above paragraph.

DriverEntry
fill DRIVER_INITIALIZATION_DATA
call DxgkInitialize and reurn its ret val (is STATUS_SUCCESS)

AddDevice
allocate private device context and return STATUS_SUCCESS


StartDevice
1. save device handle and DxgkCbUnmapMemory in the private context
2. call DxgkCbGetDeviceInformation
3. Map pci resources using DxgkCbMapMemory
4. set *sources = 1 and *children = 1

StopDevice
unmp resources using DxgkCbUnmapMemory and return STATUS_SUCCESS

RemoveDevice
free private device and return STATUS_SUCCESS


QueryChildRelations
set array elemnt 0
ChildDeviceType = TypeVideoOutput;
ChildCapabilities.Type.VideoOutput.InterfaceTechnology =
D3DKMDT_VOT_HD15;
ChildCapabilities.Type.VideoOutput.MonitorOrientationAwareness =
D3DKMDT_MOA_INTERRUPTIBLE;
ChildCapabilities.Type.VideoOutput.SupportsSdtvModes = TRUE;
ChildCapabilities.HpdAwareness = HpdAwarenessInterruptible;
AcpiUid = 0;
ChildUid = 1;
return STATUS_SUCCESS

QueryInterface
return STATUS_NOT_SUPPORTED