Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You should check out the <a href="http://download.microsoft.com/download/f/2/7/f279e71e-efb0-4155-873d-5554a0608523/CLRInsideOut2008_01.exe" rel="noreferrer">tool</a> given in this MSDN Magazine <a href="http://msdn.microsoft.com/en-us/magazine/cc164193.aspx" rel="noreferrer">article</a> that can translate a C snippet to C# P/Invoke signatures, and of course the post as well.</p> <p>Running the tool for your code snippet gives you this:</p> <pre><code>[System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct vconfig_t { /// int public int Npoly; /// int public int N; /// Ppoint_t* public System.IntPtr P; /// int* public System.IntPtr start; /// int* public System.IntPtr next; /// int* public System.IntPtr prev; } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct Ppoly_t { /// Ppoint_t* public System.IntPtr ps; /// int public int pn; } [System.Runtime.InteropServices.StructLayoutAttribute(System.Runtime.InteropServices.LayoutKind.Sequential)] public struct Pxy_t { /// double public double x; /// double public double y; } public partial class NativeMethods { /// Return Type: vconfig_t* ///obstacles: Ppoly_t** ///n_obstacles: int [System.Runtime.InteropServices.DllImportAttribute("&lt;Unknown&gt;", EntryPoint="Pobsopen")] public static extern System.IntPtr Pobsopen(ref System.IntPtr obstacles, int n_obstacles) ; /// Return Type: int ///config: vconfig_t* ///p0: Ppoint_t-&gt;Pxy_t ///poly0: int ///p1: Ppoint_t-&gt;Pxy_t ///poly1: int ///output_route: Ppolyline_t* [System.Runtime.InteropServices.DllImportAttribute("&lt;Unknown&gt;", EntryPoint="Pobspath")] public static extern int Pobspath(ref vconfig_t config, Pxy_t p0, int poly0, Pxy_t p1, int poly1, ref Ppoly_t output_route) ; /// Return Type: void ///config: vconfig_t* [System.Runtime.InteropServices.DllImportAttribute("&lt;Unknown&gt;", EntryPoint="Pobsclose")] public static extern void Pobsclose(ref vconfig_t config) ; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload