The code below works correctly when executed in "user" mode (Compatibility Mode Windows XP SP2 ) and returns a handle to LPT2
lpPrinter->hPort = CreateFile(_T("LPT2",GENERIC_WRITE | FILE_READ_ATTRIBUTES, FILE_SHARE_READ, 0, CREATE_ALWAYS,0,0);
The identical code fails when given Admin privileges and returns invalid handle and error code 2 (file does not exist),
Does anyone have an idea why this happens?