i make a program in c (with dev-c++ environnement) where i have to write on the paralel port
somebody tell me that it is more complex with xp than with windows 98 and i have to put these line in my program :
//Test operating system, if WinNT or Win2000 then get device driver handle
OSVERSIONINFO osvi;
osvi.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
GetVersionEx(&osvi);
if(osvi.dwPlatformId == VER_PLATFORM_WIN32_NT)
{
HANDLE h;
h = CreateFile("\\.\giveio", GENERIC_READ, 0, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if(h == INVALID_HANDLE_VALUE)
error_out("Could not access 'giveio.sys' device");
CloseHandle(h);
}
// you may now use any "outp" functions etc
the problem is that i have now some errors messages
he don't know lot's of word of these lines
maybe i need a library ?...
thank you for your help
Comments
Not on XP or Vista you can't use outp because the os will not allow it.
=============================================
never lie -- the government doesn't like the competition. (Author unknown)