阅读:956回复:1
救急,谁能帮帮我!!!
谁能告诉我,关于DMA的VXD是怎么搞的,我写的VXD怎么也不能正常工作.虽然DeviceIoControl()返回值是1,但是我的数据区的数据肯的是错误的(我用以前做的DOS程序来运行可以得到正确的结果),
我使用的是通道1。 if(pDmasamplDMA) { pDmasamplDMA->physicalMask(TRUE); pDmasamplDMA->unhook(); delete pDmasamplDMA; } break; case DMASAMPL_DIOC_TRANSFER_DATA: if(!pDmasamplDMA) return -1; pDMARegion1=(DMARegion *)pDIOCParams->dioc_InBuf; if(pDmasamplDMA->lockRegion(pDMARegion1->Address,pDMARegion1->Count,0,Lockable,ErrCode,PhysAddr)) { pDmasamplDMA->setRegion(NULL,TRUE,pDMARegion1->Address,pDMARegion1->Count,PhysAddr); pDmasamplDMA->physicalUnmask(pDIOCParams->dioc_hvm,TRUE); } else { VDMABuffer DmasamplBuffer(pDMARegion1->Address,pDMARegion1->Count); if(!DmasamplBuffer.m_createError) { pDmasamplDMA->setRegion(&DmasamplBuffer,FALSE,pDMARegion1->Address,pDMARegion1->Count,DmasamplBuffer.m_physAddress); pDmasamplDMA->physicalUnmask(pDIOCParams->dioc_hvm,TRUE); DmasamplBuffer.copyFrom(pDMARegion1->Address,pDMARegion1->Count,0,ErrCode); } |
|
沙发#
发布于:2001-10-06 18:34
上面的代码只是onwin32deviceiocontrol中的一部分
|
|