DeviceIoControl() Works under NT but not 2K. Heeelp.

Hi,

I'm starting to go crazy with porting some code from NT4 to 2k.

What I need to do in a nutshell is get the printer status i.e. Online, Offline etc. At present this status is polled.
This was achieved in NT4 with a call to DeviceIoControl() using IOCTL_PAR_QUERY_INFORMATION. Unfortunately the same call in 2k fails.
If I GetLastError() I get errorcode 1 (Incorrect Function)

Does anyone have any ideas on either why this function fails in 2k or what I could do to replace this function and still get the printer info. Bear in mind it is polled.

Any help much appreciated

TIA

Doug

Wheres the Bar?
[676 byte] By [User Friendly] at [2007-11-17 14:29:45]