Hi all (and Mark).
As I have posted a few times the last few weeks about my GPS application, I have got to the point of adding the GPS stuff in. I am using the Windows Mobile 6 SDk and used the Microsoft.WindowsMobile.Samples.Location project code for my project.
Now, the problem is I am getting an error, sometimes straight away (once the GPS is initialised) or during the use of it.
I get an "unexpected" error occuring and the only other information is ArgumentException Parameter Name chars.
Here are the full details of the Exception:
ArgumentException
ArgumentException
Parameter name: chars
at System.Text.UTF8Encoding.GetBytes(Char* chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, UTF8Encoder encoder)
at System.Text.UTF8Encoding.GetBytes(Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, UTF8Encoder encoder)
at System.Text.UTF8Encoding.UTF8Encoder.GetBytes(Char[] chars, Int32 charIndex, Int32 charCount, Byte[] bytes, Int32 byteIndex, Boolean flush)
at System.IO.StreamWriter.Flush(Boolean flushStream, Boolean flushEncoder)
at System.IO.StreamWriter.Dispose(Boolean disposing)
at System.IO.TextWriter.Dispose()
at Microsoft.WindowsMobile.Samples.Location.Gps.GetPo sition(TimeSpan maxAge)
at Microsoft.WindowsMobile.Samples.Location.Gps.GetPo sition()
at Microsoft.WindowsMobile.Samples.Location.Gps.WaitF orGpsEvents()
Now, I know it isnt coming from my software as when I am debugging it (not emulator but connected the the WM6 device) it states the symbols cannot be loaded for debug. I am presuming it is something in the included DLL (the Microsoft.WindowsMobile.Samples.Location.dll) from theWindows Mobile 6 SDK.
When I am debugging, I can get the Gps.cs SDK file to show itself (different reason) and it states the DLL it is using compared to the cs file is different. I havent recompiled anything, but wondering if the DLL I am using is NOT the correct one and this error is fixed in a different DLL (Just thinking out loud here and trying to supply all information).
I have seen someone ask the same question in MSDN forums, but he was ignored.
Has anyone (Mark?) had the same error when using the SDK's DLL?
What is strange as it seems the Location Sample works fine. However, I am using the exact same code, in a class, within my application.
Please... Any ideas?
Thanks,
Rob