I use char ledStatus instead of BYTE ledStatus. is there any difference??
BYTE is defined by Microsoft windows.h as unsigned char.
line 3: what is "staio.h"? is it "stdio.h" misspelled?
but the code doesn't work.
What to you mean by that? Does WriteFile() return success? Yes or No. Does your program compile without errors?
Does your computer even have a printer port? Most new computers don't because they are USB ports.