Retrieves a contiguous DMA buffer which was allocated by another process. 
{
    printf("\n\nReceived an IPC message:\n"
        "msgID [0x%lx], msgData [0x%llx] from process [0x%lx]\n",
 
    
 
    {
    case IPC_MSG_CONTIG_DMA_BUFFER_READY:
        {
            DWORD dwStatus;
 
            printf("\nThis is a DMA buffer, getting it...\n");
 
            {
                printf("ipc_msg_event_cb: Failed getting DMA buffer. "
                    "Error [0x%lx - %s]\n", dwStatus, 
Stat2Str(dwStatus));
 
                return;
            }
 
            printf("Got a DMA buffer. UserAddr [%p], "
                "pPhysicalAddr [0x%"PRI64"x], size [%ld(0x%lx)]\n",
 
 
            
        }
        break;
 
    default:
        printf("Unknown IPC type. msgID [0x%lx], msgData [0x%llx] from "
    }
}
const char *DLLCALLCONV Stat2Str(_In_ DWORD dwStatus)
Retrieves the status string that corresponds to a status code.
 
DWORD dwSenderUID
WinDriver IPC unique ID of the sending process.
 
DWORD dwMsgID
A 32 bit unique number defined by the user application.
 
UINT64 qwMsgData
Optional - 64 bit additional data from the sending user-application process.
 
DMA_ADDR pPhysicalAddr
Physical address of page.
 
DWORD dwBytes
Size of page.
 
PVOID pUserAddr
User address.
 
WD_DMA_PAGE Page[WD_DMA_PAGES]
 
DWORD DLLCALLCONV WDC_DMABufUnlock(_In_ WD_DMA *pDma)
Unlocks and frees the memory allocated for a DMA buffer by a previous call to WDC_DMAContigBufLock(),...
 
DWORD DLLCALLCONV WDC_DMABufGet(_In_ DWORD hDma, _Outptr_ WD_DMA **ppDma)
Retrieves a contiguous DMA buffer which was allocated by another process.
 
#define PRI64
formatting for printing a 64bit variable
 
@ WD_STATUS_SUCCESS
[0] Operation completed successfully