Also i darf schon mal kein int sein. Mist. Ok. Char setzen.

void __fastcall TForm1::Button1Click(TObject *Sender)
{

char buffer[1];

HANDLE hCom=CreateFile("LPT1",GENERIC_READ | GENERIC_WRITE,0,NULL, OPEN_EXISTING,0,NULL);

buffer = ReadFile(hCom,"LPT1",1,0,0); //lese lpt1

Form1->Edit1->Text=buffer();

}


Habe da ein Problem mit der Interpretation von:

ReadFile(

HANDLE hFile, // handle of file to read
LPVOID lpBuffer, // address of buffer that receives data
DWORD nNumberOfBytesToRead, // number of bytes to read
LPDWORD lpNumberOfBytesRead, // address of number of bytes read
LPOVERLAPPED lpOverlapped // address of structure for data
);