Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DWORD WINAPI ThreadFunc(void* arg) {
- Sleep(100);
- PDEVICE_CONTEXT DeviceContext = (PDEVICE_CONTEXT)arg;
- QUEUE_CONTEXT * qc = (QUEUE_CONTEXT *)DeviceContext->DefaultQueue;
- while (1)
- {
- RingBufferWrite(&(qc->RingBuffer), (BYTE*)"HELLOrn", 8);
- Sleep(1000);
- }
- return 0;
- }
- EvtIoRead(
- _In_ WDFQUEUE Queue,
- _In_ WDFREQUEST Request,
- _In_ size_t Length
- )
- {
- NTSTATUS status;
- PQUEUE_CONTEXT queueContext = GetQueueContext(Queue);
- WDFMEMORY memory;
- size_t bytesCopied = 0;
- ...
- status = RingBufferRead(&queueContext->RingBuffer,
- (BYTE*)WdfMemoryGetBuffer(memory, NULL),
- Length,
- &bytesCopied);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement