vishme7
29th August 2013, 10:54
hiii,
I am Developing win32 serial port in QT5.0.2 for my hardware.
for this i manually write the openport, closeport, read, write function
but confusing about "CreateFile" fuction.
how to use the first Parameter which is port number.
// open selected device
hSerial = CreateFile( (WCHAR *) deviceName->constData() , GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
more info. is:
QString *deviceName;
deviceName = new QString(device_Name->toLatin1());
how to use deviceName so that i get selected port name .
I am Developing win32 serial port in QT5.0.2 for my hardware.
for this i manually write the openport, closeport, read, write function
but confusing about "CreateFile" fuction.
how to use the first Parameter which is port number.
// open selected device
hSerial = CreateFile( (WCHAR *) deviceName->constData() , GENERIC_READ | GENERIC_WRITE, 0, 0, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, 0);
more info. is:
QString *deviceName;
deviceName = new QString(device_Name->toLatin1());
how to use deviceName so that i get selected port name .