none
Can we use the .Net Compact Framenwork API's for creating the Desktop application RRS feed

  • Question

  • Hi,

    I want to create an Destop Application for GPS. But in Windows i.e. Win32 API's doesn't provide some of the functionality.

    But  .Net Compact Framework has those API's for getting the Satellite Information and Signal Strength etc.So, can i use those API's for my Destop Application.

    Thanks in Advance

    Regards,

    Ldm_Metro


    Regards, Ldm_Metro

    • Moved by Mike Dos Zhang Monday, April 23, 2012 9:40 AM (From:General Windows Desktop Development Issues)
    Wednesday, April 18, 2012 5:13 AM

All replies

  • No you cannot use those APIs. If you are on windows 7 you can use Window's location API.

    Windows CE versions of APIs often have additional field members in structures than the desktop version, which means an API call would crash if the call is running on desktop unexpectedly.




    The following is signature, not part of post
    Please mark the post answered your question as the answer, and mark other helpful posts as helpful, so they will appear differently to other users who are visiting your thread for the same problem.
    Visual C++ MVP


    Wednesday, April 18, 2012 6:07 AM
  • Hi Sheng,

    Do we have some API's in Windows 7,Windows 8 for displaying the Satellite Information on the view and Signal Strength of the Satelllites.

    Like we have in .Net Compact Framework.

    My Purpose:

    I wanted to Create a Application (Windows 7,8 and Metro UI) which will display the Number of satellite and the Signal strength of each satellite.But Win32 API's don't have that support.

    Any alternate suggestionis Most Welcomed.

    Thanks in Advance

    Regards,

    Ldm_Metro


    Regards, Ldm_Metro

    Wednesday, April 18, 2012 7:15 AM
  • I found that Windows has the Location API: http://msdn.microsoft.com/en-us/library/windows/desktop/dd464636(v=vs.85).aspx

    C:\Program Files\Microsoft SDKs\Windows\v7.1\Samples\winui\Location

    The above directory will help you to find several Location API samples.

    Maybe this can give you the help. And also the Sensor APIs: http://msdn.microsoft.com/en-us/library/windows/desktop/dd318981(v=vs.85).aspx


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us


    Wednesday, April 18, 2012 9:36 AM
  • Hi Mike,

    But those API'S give us information only about the latitude, longitude etc.. values and don't give us Information regarding the Satellite information and signal strength of the Satellites used for the GPS application.

    Do we have support for displaying Satellites in View and their signal strength in Windows 8/Windows 7?


    Regards, Ldm_Metro


    • Edited by Ldm_Metro Wednesday, April 18, 2012 9:55 AM
    Wednesday, April 18, 2012 9:48 AM
  • I edited my post with this link: http://msdn.microsoft.com/en-us/library/windows/desktop/dd318981(v=vs.85).aspx

    This is the only Desktop kind API has the Satellite content I can find.

    And I found this forum would be helpful to you: http://social.msdn.microsoft.com/Forums/en-US/windowssensorandlocationplatform/threads 

    http://archive.msdn.microsoft.com/SensorsAndLocation


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us



    Wednesday, April 18, 2012 9:52 AM
  • Ldm_Metro wrote:
    >
    >But those API'S give us information only about the latitude, longitude
    >etc.. values and don't give us Information regarding the Satellite
    >information and signal strength of the Satellites used for the GPS
    >application.
    >
    >Do we have support for displaying Satellites in View and their signal
    >strength in Windows 8/Windows 7?
     
    Not from the API, no.  The API provides an abstraction, giving you location
    services while hiding the actual mechanisms in the implementation.  You may
    be able to get more information by talking directly to the hardware, but at
    the expense of the abstraction.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.
     

    Tim Roberts, VC++ MVP Providenza & Boekelheide, Inc.
    Thursday, April 19, 2012 5:43 AM
  • Hi Tim,

    Thanks for the Solution.

    But in the sensors.h header file we have  properties for getting the Information of the Satellites.

    Example:

    // SENSOR_DATA_TYPE_SATELLITES_USED_COUNT: Number of satellites used in solution
    DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_SATELLITES_USED_COUNT,              0X055C74D8, 0XCA6F, 0X47D6, 0X95, 0XC6, 0X1E, 0XD3, 0X63, 0X7A, 0X0F, 0XF4, 15); //[VT_I4]
    // SENSOR_DATA_TYPE_SATELLITES_USED_PRNS: PRN numbers of satellites used in the solution
    DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_SATELLITES_USED_PRNS,               0X055C74D8, 0XCA6F, 0X47D6, 0X95, 0XC6, 0X1E, 0XD3, 0X63, 0X7A, 0X0F, 0XF4, 16); //[VT_VECTOR | VT_UI4]
    // SENSOR_DATA_TYPE_SATELLITES_IN_VIEW: Number of satellites in view.  From 0-GPS_MAX_SATELLITES
    DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_SATELLITES_IN_VIEW,                 0X055C74D8, 0XCA6F, 0X47D6, 0X95, 0XC6, 0X1E, 0XD3, 0X63, 0X7A, 0X0F, 0XF4, 17); //[VT_I4]
    // SENSOR_DATA_TYPE_SATELLITES_IN_VIEW_PRNS: PRN numbers of satellites in view
    DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_SATELLITES_IN_VIEW_PRNS,            0X055C74D8, 0XCA6F, 0X47D6, 0X95, 0XC6, 0X1E, 0XD3, 0X63, 0X7A, 0X0F, 0XF4, 18); //[VT_VECTOR | VT_UI4]
    // SENSOR_DATA_TYPE_SATELLITES_IN_VIEW_ELEVATION: Elevation of each sattellite in view
    DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_SATELLITES_IN_VIEW_ELEVATION,       0X055C74D8, 0XCA6F, 0X47D6, 0X95, 0XC6, 0X1E, 0XD3, 0X63, 0X7A, 0X0F, 0XF4, 19); //[VT_VECTOR | VT_R8]
    // SENSOR_DATA_TYPE_SATELLITES_IN_VIEW_AZIMUTH: Azimuth of each satellite in view
    DEFINE_PROPERTYKEY(SENSOR_DATA_TYPE_SATELLITES_IN_VIEW_AZIMUTH,         0X055C74D8, 0XCA6F, 0X47D6, 0X95, 0XC6, 0X1E, 0XD3, 0X63, 0X7A, 0X0F, 0XF4, 20); //[VT_VECTOR | VT_R8]

    But while using this property we are getting an exception : Element not Found.

    My Question is if this properies are available in the Sensors.h file then why can't we use it for displaying the values.

    Regards,

    Ldm_Metro

    //[VT_I4]


    Regards, Ldm_Metro

    Monday, April 23, 2012 6:29 AM
  • I'm not familiar with the sensor functions, so I moved your question to this sensor forum to help you get the helps as possible.

    Best wishes,


    Mike Zhang[MSFT]
    MSDN Community Support | Feedback to us

    Monday, April 23, 2012 9:41 AM