Hey,
I'm writing a program which will run on a PDA equipped with a GPS link.
I'm trying to read data from the GPS-device, but so far I've been out of
luck..
(OS: Windows CE - coding language: C# - GPS device: HI-303MMF - PDA:
COMPAQ iPAQ)
The GPS device uses a COM port of the PDA. This should be similar to
writing software for a normal COM-device on q desktop-pc.
Everything goes right up untill I use this function:
WaitCommEvent(uHandle, uMask, uOverlapped);
This function should normally wait untill data can be read from the
device. Unfortunalty, the function returns false. (failure)
According to GetLastError() the device handler (uHandle) is corrupt but
when debugging I can clearly see that my device handler _is_ set after
"CreateFile(cs.port, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);"
I'm a newbie at this level of programming and totally out of options.
Did anybody have the same problem, or any clue as to what might have
gone wrong ?
I checked the BaudRate, Data bit, Parity.. etc of the connection, and
those all seem to be in order..
Thanks a lot for any assistance,
Luk Vloemans
IT student 2 3074
Hey,
I found the solution to my problem. If anyone has a similar problem, you
should always use your original file handler, returned by CreateFile().
special thanks to Mattias Sjögren.
grtz,
Luk Vloemans
Luk Vloemans wrote: Hey,
I'm writing a program which will run on a PDA equipped with a GPS link. I'm trying to read data from the GPS-device, but so far I've been out of luck..
(OS: Windows CE - coding language: C# - GPS device: HI-303MMF - PDA: COMPAQ iPAQ)
The GPS device uses a COM port of the PDA. This should be similar to writing software for a normal COM-device on q desktop-pc.
Everything goes right up untill I use this function:
WaitCommEvent(uHandle, uMask, uOverlapped);
This function should normally wait untill data can be read from the device. Unfortunalty, the function returns false. (failure)
According to GetLastError() the device handler (uHandle) is corrupt but when debugging I can clearly see that my device handler _is_ set after "CreateFile(cs.port, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);"
I'm a newbie at this level of programming and totally out of options.
Did anybody have the same problem, or any clue as to what might have gone wrong ?
I checked the BaudRate, Data bit, Parity.. etc of the connection, and those all seem to be in order..
Thanks a lot for any assistance,
Luk Vloemans IT student
Sounds interesting, this program. Any possabilities to get information about
the progress?
/Martin
"Luk Vloemans" <lu**********@student.luc.ac.be> wrote in message
news:%2***************@TK2MSFTNGP10.phx.gbl... Hey,
I'm writing a program which will run on a PDA equipped with a GPS link. I'm trying to read data from the GPS-device, but so far I've been out of luck..
(OS: Windows CE - coding language: C# - GPS device: HI-303MMF - PDA: COMPAQ iPAQ)
The GPS device uses a COM port of the PDA. This should be similar to writing software for a normal COM-device on q desktop-pc.
Everything goes right up untill I use this function:
WaitCommEvent(uHandle, uMask, uOverlapped);
This function should normally wait untill data can be read from the device. Unfortunalty, the function returns false. (failure)
According to GetLastError() the device handler (uHandle) is corrupt but when debugging I can clearly see that my device handler _is_ set after "CreateFile(cs.port, GENERIC_READ, 0, 0, OPEN_EXISTING, 0, 0);"
I'm a newbie at this level of programming and totally out of options.
Did anybody have the same problem, or any clue as to what might have gone wrong ?
I checked the BaudRate, Data bit, Parity.. etc of the connection, and those all seem to be in order..
Thanks a lot for any assistance,
Luk Vloemans IT student This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: jim |
last post by:
Hi, All
I am using python (activestate 2.2.2-224) on XP home and have suddenly got
the
following error from a file which worked fine under millenium.
File...
|
by: jim |
last post by:
Hi, All
I am using python (activestate 2.2.2-224) on XP home and have suddenly got
the following error from a file which works fine under millenium.
File...
|
by: jim |
last post by:
Hi, All
I am using python (activestate 2.2.2-224) on XP home and have suddenly got
the
following error from a file which worked fine under millenium.
self.Overlapped = win32file.OVERLAPPED()...
|
by: Torre Quinn |
last post by:
I am not even sure what group to ask this question so forgive me if this is
not the correct forum. I am really just starting my research on this subject
so pardon me if they are "green".
I am...
|
by: craigkenisston |
last post by:
Hi,
I will use an example to do a simplified description of my problem,
please don't laugh.
I just "believe" I would have to use either interface or abstract
classes, but I've not ever write an...
|
by: basyarie |
last post by:
Hello All,
I`d like to introduce myself.
I`m basyarie, now is student of university.
Nice to meet you all.
I`m beginner in this discussion community.
Just want to ask about VB6 for GPS...
|
by: volosov |
last post by:
I would really appreciate if someone could give me a hint
how these floats are encoded:
0B7D2F70 41.8713
0B7D232F 41.8687
0B7D220F 41.8684
Thanks in advance
Vadim
|
by: ashore |
last post by:
Folks, I'm looking to send some coords data to a GPS unit. Any hints
on how to do that will be mucho appreciado. Info on addressing as
well as data formats, ... ?
I want to embed this...
|
by: Arepi |
last post by:
Hi!
How can I use WaitCommEvent (for COM PORT ) in Perl ?
(I downloaded the Win32-SerialPort-0.19 modul from cpan but nothing)
Thanks!
|
by: Destiny111 |
last post by:
Hi!
I have a gps program which works only when the "manage gps automatically" function is checked in the PDA settings. I do not want to enable user to disable my gps coords logging by uncheck...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
| |