Click here to Skip to main content
14,669,375 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi ,
I am using window 7 64 bit and 64 bit device driver,
When i am trying to use the function DeviceIoControl(), the output buffer is always empty but the number of bytes returned is 4.


The exact syntax is given below
DeviceIoControl(m_device, IOCTL_USER_BUFFER, NULL, 0,
	   &outbuffer, sizeof(UINT_PTR), &Bytes, NULL);


The datatype of outbuffer is PBYTE and Bytes is DWORD

#define IOCTL_USER_BUFFER CTL_CODE(FILE_DEVICE_UNKNOWN, \
                                                 0x801, \
                                                 METHOD_BUFFERED, \
                                                 FILE_ANY_ACCESS)


But when i use the DeviceIoControl function for "0x800", I am able to receive buffer.

Please suggest me if i am missing something.

What I have tried:

DeviceIoControl is returning empty buffer when communicating with 64 bit device driver
Posted
Updated 8-Mar-16 19:23pm
v2
Comments
Jochen Arndt 9-Mar-16 3:32am
   
Did you check the return value if the operation was successful?

[EDIT]
If the call is successful, the result are 4 zero bytes. What are you expecting instead?

That can be only answered by the documentation or the author of the OEM driver.
[/EDIT]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100