locked
how to get device info and os info in pure c++ app?

    Question

  • Microsoft.Phone.Info.DeviceExtendedProperties only have a C# version.

    so plz tell me ,how can i get info of my win{hone in my c++ app.

    (BTW,a pure cpp app can't call a dll write in c#,but a c# app can call a dll write in c/cpp).

    Tuesday, September 23, 2014 11:41 AM

Answers

All replies

  • It depends on what information you're interested in in detail. For example the memory consumption, etc. that was present in the DeviceStatus object is available in MemoryManager class when you use the WinRT App Model: http://msdn.microsoft.com/en-us/library/windows.system.memorymanager.aspx?cs-save-lang=1&cs-lang=cpp#code-snippet-1

    What version of WP are you targeting? I'm not sure wether there is a native equivalent to the DeviceStatus class in a pure C++ WP8.0 App.

    Tuesday, September 23, 2014 1:24 PM
  • Such as phone model,manufacturer.os version,firmware version,DeviceUniqueId ,wifi mac,blurtooth mac.etc.

    What version of WP are you targeting?  from 8.0 to 8.1 seems not add new api of DeviceStatus in Cpp. if 8.1 has new API,plz tell me.

    Thursday, September 25, 2014 7:19 AM
  • MAC adresses in general are not available in any WP runtime version.

    For a Device Id you might want to use the App Specific Hardware Id (ASHWID) as described here: http://msdn.microsoft.com/en-us/library/windows/apps/jj553431.aspx

    For the others I don't know if they might be recoverable somehow but going by recent discussions in several forums I believe that there is no easy way to get to that data when you can't access the DeviceStatus class.

    Thursday, September 25, 2014 8:16 AM