<div dir="ltr">HI<br><br>Might I politely suggest that you should think about asking effective questions? It is not clear from this what you are actually asking.<br><br>My interpretation is that the vcpkg thing is not the question (so it would be nice if that was not the start of the email - it is FYI info).<br><br>It looks like you are asking for help with PInvoke and Proj in C#. That is not going to be an easy ask - since it is not a supported environment in Proj and PInvoke is at best a dark art.<br><br>It is not clear from the question if proj_create_crs_to_crs is a method that works or one that does not work. If it does not work - what is the problem/error message?<br><br>As a general note - what I do since I do not want to have an unsupported Pinvoke interface is to use GDAL. This has supported C# bindings and does expose at least some of the Proj functionality as the OSR ABI. Not an ideal solution but workable and supported.</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 5 Jan 2023 at 20:27, Jason Dick <<a href="mailto:JasonD@thetranstecgroup.com">JasonD@thetranstecgroup.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

  
  <div bgcolor="#FFFFFF">
    <p>I used vcpkg. I used the instructions from the web site:</p>
    <p><a href="https://proj.org/install.html" target="_blank">https://proj.org/install.html</a></p>
    <p>It did take me awhile to get it working because I needed to
      customize the process. But now that the DLL is built by default,
      that's less necessary.</p>
    <p>I only use a handful of functions and there are some that I
      didn't know how to convert to C#. Here's an example of one import
      that I use.</p>
    <p>private const String ProjDLL = "proj.dll";<br>
    </p>
    <p>// PJ *proj_create_crs_to_crs(PJ_CONTEXT *ctx, const char
      *source_crs, const char *target_crs, PJ_AREA *area)<br>
      [DllImport(ProjDLL, CallingConvention = CallingConvention.Cdecl,
      CharSet = CharSet.Ansi, BestFitMapping = false,
      ThrowOnUnmappableChar = true)]<br>
      private static extern IntPtr proj_create_crs_to_crs(IntPtr ctx,
      String source_crs, String target_crs, IntPtr area);<br>
    </p>
  </div>

_______________________________________________<br>
PROJ mailing list<br>
<a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a><br>
</blockquote></div>