Click here to Skip to main content
15,889,216 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:

Hi,

I am using the 3rd party device driver (.sys file) and using window embedded standard 7 os.

When i execute the funciton DeviceIoControl() for the above sys file, the return code is success but the output buffer is null. The control code used is IOCTL_MAP_COMMON_BUFFER_TO_USER (User defined).

The functionality of the above control code is

The sys file will communicate to "L"\\Device\\PhysicalMemory" and will map the common buffer onto a range of virtual addresses in a process's address space.

DeviceIoControl is returning NULL buffer only after updating the below latest security patches for the Windows Embedded standard 7 OS. If i uninstall the below patches, DeviceIoControl is returning valid buffer pointer. The issue is happening even if i install any one of the below patch.
3126587
3153171
3146706
3060716
3071756

Could you please help what the above pathces is doing and do i need to change the device driver code?

Thanks in advance

What I have tried:

The below function return null buffer

r = DeviceIoControl(Display, IOCTL_MAP_COMMON_BUFFER_TO_USER, NULL, 0,
&UserPointer, sizeof(UINT_PTR), &BytesReturned, NULL);

if (UserPointer == NULL)
{
AfxMessageBox(L"NULL pointer for MAP_COMMON_BUFFER");
return;
}
Posted
Updated 28-Jun-16 3:49am
Comments
Dave Kreskowiak 12-Jun-16 23:01pm    
You're going to have to ask Microsoft Support this question.

1 solution

You need an update of the 3rd party driver. Looks like it has some security issues to solve. Alternativly you can ask Microsoft about it and maybe they had done something wrong.

I would call the the device "\\.\PhysicalMemory" in that way or change some parameter.

Tip: GetLastError may indicate what went wrong.
 
Share this answer
 

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