Click here to Skip to main content
15,886,067 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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
C++
DeviceIoControl(m_device, IOCTL_USER_BUFFER, NULL, 0,
	   &outbuffer, sizeof(UINT_PTR), &Bytes, NULL);


The datatype of outbuffer is PBYTE and Bytes is DWORD

C++
#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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900