Thank you fatjuicymole for your reply.

i did tried that do .

below is the code i tried.

HANDLE h = SetupDiGetClassDevs(&GUID_CLASS_COMPORT,NULL,NULL, DIGCF_PRESENT | DIGCF_INTERFACEDEVICE);

if ( h == INVALID_HANDLE_VALUE )
{
qDebug ()<<"invalid";
}
else
{
qDebug ()<<"valid handle";

qDebug ()<<h;


}
Handle is valid .

can you please lead me further to proceed.

Sorry to be annoying because i am very to new Qt and windows programming

Thank you for your time.