I am trying to open a Com port using the following Code:
CComPort aCD;
aCD.m_hComm=CreateFile(aCD.m_cgzPort,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
Unfortunately, something is going wrong and it is failing to open.
I am using GetLastError to find out what is going wrong and this is giving me the error:
"System cannot find the specified path".
This would make sense to me if it was an actual file I was opening but what does it mean when it is a Com port you are trying to open ??
Can anybody throw some light on this ?? Is my Com port set up wrong or what ???
CComPort aCD;
aCD.m_hComm=CreateFile(aCD.m_cgzPort,GENERIC_READ|GENERIC_WRITE,0,NULL,OPEN_EXISTING,0,NULL);
Unfortunately, something is going wrong and it is failing to open.
I am using GetLastError to find out what is going wrong and this is giving me the error:
"System cannot find the specified path".
This would make sense to me if it was an actual file I was opening but what does it mean when it is a Com port you are trying to open ??
Can anybody throw some light on this ?? Is my Com port set up wrong or what ???