title: Parse through a struct and returning values to C# from C++ function
body: <p>.h file</p>
  
  <pre><code>public ref class Lockscreen sealed
  {
  public:
      Lockscreen();
      _BADGE_INFORMATION GetLockscreenNotificationData();
  };
  </code></pre>
  
  <p>.cpp file</p>
  
  <pre><code>_BADGE_INFORMATION Lockscreen::GetLockscreenNotificationData()
  {
  
  GetNotificationsSnapshot(&amp;snapshot);
  _BADGE_INFORMATION badgeInfo;
  return badgeInfo;}
  </code></pre>
  
  <p>The above two are my header and cpp files. I have to return the struct _BADGE_INFORMATION back to my C# code from the cpp file. But while doing so am getting an error that says, "signature of public member contains native type _BADGE_INFORMATION", this data is very crucial to my app, and I have never ever worked on C++ before.I need to serialize this data and send it back to my C# code. Can someone tell me how. Or suggested any other means to get the data of the struct. Any help will be appreciated.</p>