none
GPS detection in Windows 10

    Question

  • For GPS detection
    Problem:
    • Our Win32 desktop application was working fine before Windows 10 (Win 7/Win 8/Win 8.1/Win 8.1 Update) by using ILocation interface to detect GPS information. However, in Windows 10 preview(build 10122), either the function ILocation::RequestPermissions() returns HRESULT "FAILED" without popping up any notification to ask user for permission, or we get "REPORT_NOT_SUPPORTED" status when calling ILocation::GetReportStatus(IID_ILatLongReport, &locStatus). Both cases ended up that we couldn't get any GPS information.
    Questions:
    • Is there any new API that classic MFC Win32 desktop application can use to obtain Device GPS information other than ILocation interface? Also, it seems like our MFC Win32 desktop app couldn't use/access the Windows.Devices.Geolocation namespace since it's part of the WinRT API.
    • If there isn't, could you recommend a way for classic MFC Win32 desktop app in Windows 10 to achieve what I described above?
    Wednesday, June 10, 2015 7:48 PM

All replies

  • Any update on this?
    Monday, June 15, 2015 3:51 PM
  • GPS is a serial stream, standardized to 4800 bps so its not super fast

    you can open it directly with fopen() etc

    then you can parse the GPS sentences and get location exactly over time

    you may need to open all the serial ports to detect the GPS stream


    M5A99FX

    Hardcore Games Legendary is the Only Way to Play!
    Vegan Advocate How can you be an environmentalist and still eat meat?

    Monday, June 15, 2015 9:38 PM
  • Sorry I'm not getting what you are saying.

    We are a desktop application and trying to get user's GPS location over time. ILocation COM interface was working fine before Windows 10 preview. I just want to know why the same codes doesn't work any more? Does windows 10 change something about the interface or it's just a bug of Windows 10 preview?

    Thanks!

    Monday, June 15, 2015 9:47 PM
  • I have only done GPS using the old Win32

    The COM interface is not needed at all

    using the LocationAPI.h seems to have changed, I recall some comments about it 3-4 years ago

    https://msdn.microsoft.com/en-us/library/windows/desktop/dd317674(v=vs.85).aspx

    can you post your code so I can how you are making the call, Windows 10 does have some changes


    M5A99FX

    Hardcore Games Legendary is the Only Way to Play!
    Vegan Advocate How can you be an environmentalist and still eat meat?

    Monday, June 15, 2015 10:00 PM