K
Kris Luyten
Hi,
I am trying to access the Haicom HI-303MMF GPS modul using C# (.Net
Compact Framework on Pocket PC). The NMEA data that it produces can be
read from the (virtual) COM6 port.
I try to open a connection with the COM6 port
using CreateFile like this:
======
[DllImport("coredll.dll",SetLastError=true)]
private static extern unsafe int CreateFile.....
....
m_ihandle = CreateFile("COM6",GENERIC_READ, 0, 0, OPEN_EXISTING,0, 0);
....
=====
This works when COM6 is replaced by COM1, but COM6 gives me the
error (obtained by the GetLastError function):
"2: The System Cannot find the file specified."
I also tried using "COM6:", "//./COM6", "//./COM6:" and "\\\\.\\COM6" as
identifier, but they also fail.
Is there something I should take into account because of the high number
of the COM port?
Thanks,
Kris
I am trying to access the Haicom HI-303MMF GPS modul using C# (.Net
Compact Framework on Pocket PC). The NMEA data that it produces can be
read from the (virtual) COM6 port.
I try to open a connection with the COM6 port
using CreateFile like this:
======
[DllImport("coredll.dll",SetLastError=true)]
private static extern unsafe int CreateFile.....
....
m_ihandle = CreateFile("COM6",GENERIC_READ, 0, 0, OPEN_EXISTING,0, 0);
....
=====
This works when COM6 is replaced by COM1, but COM6 gives me the
error (obtained by the GetLastError function):
"2: The System Cannot find the file specified."
I also tried using "COM6:", "//./COM6", "//./COM6:" and "\\\\.\\COM6" as
identifier, but they also fail.
Is there something I should take into account because of the high number
of the COM port?
Thanks,
Kris