Here is a code sample of what I am trying to do inside a driver that
will control a DMA device. The exact same code works perfectly under
any 32 bit Windows OS (2000, XP, 2003). Why does it fail when I run
this under Windows XP 64 bit. Since there is no return code on the
call, it is hard to figure what could be wrong.
I have tried to change many of the parameters without any success.
m_ulNumberOfMapRegs = 0;
DEVICE_DESCRIPTION oDevDesc;
RtlZeroMemory(&oDevDesc, sizeof(DEVICE_DESCRIPTION)); //Fill the
struct with zeros
//Now fill in the stuct with valid information
oDevDesc.Version = DEVICE_DESCRIPTION_VERSION;
oDevDesc.Master = TRUE;
oDevDesc.ScatterGather = TRUE;
oDevDesc.DemandMode = FALSE;
oDevDesc.AutoInitialize = FALSE;
oDevDesc.Dma32BitAddresses = FALSE;
oDevDesc.IgnoreCount = FALSE;
oDevDesc.Dma64BitAddresses = TRUE;
oDevDesc.DmaChannel = 0;
oDevDesc.InterfaceType = PCIBus;
oDevDesc.DmaWidth = Width32Bits;
oDevDesc.DmaSpeed = Compatible;
oDevDesc.MaximumLength = 8294400;
//Now get the pointer to the DMA Adapter
m_psDmaAdapter = IoGetDmaAdapter(poPhysicalDeviceObject,
&oDevDesc,
&m_ulNumberOfMapRegs);