Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Communication Port

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi.
I wan't to make my program to Read on COM 1(2)
and to display the received data in Memo.Is i need to have some
communication devices to be attached on that com i to can read on it.
I try this but allways give me error.
HANDLE hCom = CreateFile("COM2",GENERIC_READ,0,NULL,OPEN_EXISTING,0,NULL);
if (hCom == INVALID_HANDLE_VALUE) {
Memo1->Lines->Add("Error");
}
Can someone help me.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top