trying to figure out how exactly i can write hex values (ex 0x3) to my computers lpt1 without using any 3rd party methods.
so exclusively using the winapi, what exactly is the syntax to write to lpt1?
this is what i've tried but get compile error. and if i change valuetosend to
char valuetosend[4]="0x3";
it just sits at the console screen.
writefile cannot convert parameter 1 from int to lpcvoid
1 2 3 4 5 6 7 8 9 10 11 12 13 14
#include <windows.h>
#include <iostream>
#include <fstream>
int main()
{
HANDLE WINAPI test =CreateFileA("LPT1", GENERIC_WRITE, 0, 0, CREATE_ALWAYS, FILE_FLAG_NO_BUFFERING, 0);
int valuetosend=0x3;
WriteFile(test,valuetosend, sizeof(valuetosend), &written,0)
return 0;
}