S
Ich hab das jetzt mal so probiert:
PurgeComm(hCom, PURGE_TXCLEAR | PURGE_RXCLEAR);
getchar();
char start[7] = "*start";
for(int i = 0; i < 7; i++){
bWriteRC = WriteFile(hCom, (LPCVOID)start[i], 1, &iBytesWritten, NULL);
}
PurgeComm(hCom, PURGE_TXCLEAR | PURGE_RXCLEAR);
getchar();
char Zon[5] = "*Zon";
for(int i = 0; i < 4; i++){
bWriteRC = WriteFile(hCom, (LPCVOID)Zon[i], 1, &iBytesWritten, NULL);
}
PurgeComm(hCom, PURGE_TXCLEAR | PURGE_RXCLEAR);
getchar();
char Zoff[6] = "*Zoff";
for(int i = 0; i < 5; i++){
bWriteRC = WriteFile(hCom, (LPCVOID)Zoff[i], 1, &iBytesWritten, NULL);
}
aber auch ohne Erfolg.