IoGetDeviceObjectPointer returns STATUS_ACCESS_DENIED

Hi All

I’m trying to write a driver for XP that uses serial.sys to communicate with
my device. In my AddDevice routine I’m calling IoGetDeviceObjectPointer()
as shown below, but get STATUS_ACCESS_DENIED. Any ideas?

RtlInitUnicodeString(&ComPortSymLink, L"\DosDevices\COM1");

ntStatus = IoGetDeviceObjectPointer(&ComPortSymLink,
FILE_ALL_ACCESS,
&ComPortFileObject,
&deviceExtension->PhysicalDeviceObje
ct);
Nick Clarke

e-mail: xxxxx@redsoftsys.com
web: http://www.redsoftsys.com

> my device. In my AddDevice routine I’m calling IoGetDeviceObjectPointer()

as shown below, but get STATUS_ACCESS_DENIED. Any ideas?

RtlInitUnicodeString(&ComPortSymLink, L"\DosDevices\COM1");

No, use the PnP device interface arrival notification for Serial class to get
the name.

Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
xxxxx@storagecraft.com
http://www.storagecraft.com