Skip to content

Instantly share code, notes, and snippets.

@realvictorprm
Created June 30, 2017 12:16
Show Gist options
  • Save realvictorprm/0e677a692fe67651d4e8a05ea2bb7572 to your computer and use it in GitHub Desktop.
Save realvictorprm/0e677a692fe67651d4e8a05ea2bb7572 to your computer and use it in GitHub Desktop.
// Wrong function
[SuppressUnmanagedCodeSecurity]
[DllImport("glfw3", CallingConvention = CallingConvention.Cdecl,
EntryPoint = "glfwCreateWindowSurface")]
public static extern VkResult CreateWindowSurface(IntPtr instance, GLFWwindow window, IntPtr allocator, out long surface);
// Working function
[<SuppressUnmanagedCodeSecurity>]
[<DllImport("glfw3", CallingConvention = CallingConvention.Cdecl, EntryPoint = "glfwCreateWindowSurface")>]
extern VkResult CreateWindowSurface(uint64 instance, nativeint window, nativeint allocator, unativeint& surface);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment