Link to home
Start Free TrialLog in
Avatar of toddj
toddj

asked on

Timeouts on LPT1

I am writing a program that gets a handle to the parrallel port using CreateFile and then sends a string of bytes out that port to be printed using WriteFile.  I am trying to incorporate some sort of timeout functionality in this program but ever time I try to call either GetCommTimeouts or SetCommTimeouts I get an error 1: ERROR_INVALID_FUUNCTION.  Is it possible to use these functions when writing out LPT1?  If not is their any way to get some sort of timeout capability on the parallel port?
ASKER CERTIFIED SOLUTION
Avatar of bbarber
bbarber

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of bbarber
bbarber

if ( 0 == SetTimer ( hWnd, 1, ( UINT )600L, NULL ) )
{
MessageBox(hWnd, "Unable to Initialize Queue Refresh Timer.\r\nAutomatic Refresh of this Queue is disabled.", "Timer Warning!", MB_ICONEXCLAMATION | MB_OK);
                                          }

if ( 0 == SetTimer ( hWnd, 1, ( UINT )600L, NULL ) )
{
MessageBox(hWnd, "Unable to Initialize Queue Refresh Timer.\r\nAutomatic Refresh of this Queue is disabled.", "Timer Warning!", MB_ICONEXCLAMATION | MB_OK);
                                          }