WdfCommonBufferCreateWithConfig return error

My dirver called the WdfCommonBufferCreateWithConfig, then trigger an internal exception. And return ntstatus = STATUS_INVALID_DEVICE_REQUEST.

The WDK document says WdfCommonBufferCreateWithConfig return one of the following values:

STATUS_INVALID_PARAMETER
The driver supplied an invalid parameter.
STATUS_INSUFFICIENT_RESOURCES
The framework could not allocate a common buffer object, or the system could not allocate a buffer.

Why return STATUS_INVALID_DEVICE_REQUEST?

Check if you supply a valid WDFDMAENABLER parameter.

Igor Sharovar

!wdfkd.wdflogdump

Should tell you what is incorrect about the call.

d

dent from a phpne with no keynoard

-----Original Message-----
From: xxxxx@yahoo.com.cn
Sent: September 13, 2010 5:58 PM
To: Windows System Software Devs Interest List
Subject: [ntdev] WdfCommonBufferCreateWithConfig return error

My dirver called the WdfCommonBufferCreateWithConfig, then trigger an internal exception. And return ntstatus = STATUS_INVALID_DEVICE_REQUEST.

The WDK document says WdfCommonBufferCreateWithConfig return one of the following values:

STATUS_INVALID_PARAMETER
The driver supplied an invalid parameter.
STATUS_INSUFFICIENT_RESOURCES
The framework could not allocate a common buffer object, or the system could not allocate a buffer.

Why return STATUS_INVALID_DEVICE_REQUEST?


NTDEV is sponsored by OSR

For our schedule of WDF, WDM, debugging and other seminars visit:
http://www.osr.com/seminars

To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer

xxxxx@yahoo.com.cn wrote:

My dirver called the WdfCommonBufferCreateWithConfig, then trigger an internal exception. And return ntstatus = STATUS_INVALID_DEVICE_REQUEST.

The WDK document says WdfCommonBufferCreateWithConfig return one of the following values:

STATUS_INVALID_PARAMETER
The driver supplied an invalid parameter.
STATUS_INSUFFICIENT_RESOURCES
The framework could not allocate a common buffer object, or the system could not allocate a buffer.

Why return STATUS_INVALID_DEVICE_REQUEST?

WdfCommonBufferCreateWithConfig is a wrapper around the kernel function
AllocateCommonBuffer, which is part of the DMA_ADAPTER. That API can
return various errors, which WdfCommonBufferCreateWithConfig will pass
along.

The two errors you mentioned are merely the errors that this function
can generate on its own. In general, the documentation does not mention
errors that can be returned by the functions each API calls.


Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.