NativeVersion.cs 1.6 KB

1234567891011121314151617181920212223242526272829303132333435
  1. /****************************************************************************
  2. * Copyright 2019 Nreal Techonology Limited. All rights reserved.
  3. *
  4. * This file is part of NRSDK.
  5. *
  6. * https://www.nreal.ai/
  7. *
  8. *****************************************************************************/
  9. namespace NRKernal
  10. {
  11. using System.Runtime.InteropServices;
  12. /// <summary> 6-dof Trackable Image Tracking's Native API . </summary>
  13. internal partial class NativeVersion
  14. {
  15. /// <summary> Gets the version. </summary>
  16. /// <returns> The version. </returns>
  17. public static string GetVersion()
  18. {
  19. NRVersion version = new NRVersion();
  20. NativeApi.NRGetVersion(ref version);
  21. return version.ToString();
  22. }
  23. private partial struct NativeApi
  24. {
  25. /// <summary> Nr get version. </summary>
  26. /// <param name="out_version"> [in,out] The out version.</param>
  27. /// <returns> A NativeResult. </returns>
  28. [DllImport(NativeConstants.NRNativeLibrary)]
  29. public static extern NativeResult NRGetVersion(ref NRVersion out_version);
  30. };
  31. }
  32. }