ListBox1->Items->Clear();// <------- begin of 1st enumerate, from provided example res=BeginEnumeratePorts(); while(TRUE) { if(!EnumeratePortsNext(res,buf))break; ListBox1->Items->Add(buf); i++; } EndEnumeratePorts(res); ListBox1->Items->Clear(); // <------- begin of 2nd enumerate, identical to 1st one res=BeginEnumeratePorts(); while(TRUE) { if(!EnumeratePortsNext(res,buf))break; ListBox1->Items->Add(buf); i++; } EndEnumeratePorts(res);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)