You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
735B

  1. using System;
  2. using System.Runtime.InteropServices;
  3. namespace NScript.Filmscript
  4. {
  5. public static class GeneralBindings
  6. {
  7. // raw bindings
  8. [DllImport("filmscript.dll")]
  9. public static extern string filmscript_version();
  10. private static bool? dllExists = null;
  11. public static string Version()
  12. {
  13. return filmscript_version();
  14. }
  15. public static bool DllExists()
  16. {
  17. if (dllExists != null) return dllExists.Value;
  18. try
  19. {
  20. filmscript_version();
  21. return true;
  22. }
  23. catch (DllNotFoundException)
  24. {
  25. return false;
  26. }
  27. }
  28. }
  29. }