<p dir="ltr">Hi Peter,</p>
<p dir="ltr">try like this<br>
<a href="http://cboard.cprogramming.com/csharp-programming/126794-my-zlib1-dll-wrapper-no-does-not-work-net-4-0-a.html">http://cboard.cprogramming.com/csharp-programming/126794-my-zlib1-dll-wrapper-no-does-not-work-net-4-0-a.html</a></p>
<p dir="ltr">Maybe it is only the calling convention which fails.</p>
<p dir="ltr">To the other question, use DependencyWalker to see what functions those DLLs export and what the signatures are of them.<br>
<a href="http://www.dependencywalker.com">http://www.dependencywalker.com</a></p>
<p dir="ltr">Hope this helps.</p>
<p dir="ltr">Best regards,<br>
Sebatian</p>
<div class="gmail_quote">On 15 Jun 2016 16:49, "Peter via openslide-users" <<a href="mailto:openslide-users@lists.andrew.cmu.edu">openslide-users@lists.andrew.cmu.edu</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Benjamin,<br>
<br>
Thanks for the answer, but this does not help. I copied the dll already manually or automatically with the solution, but on runtime, the dll are not found.<br>
<br>
The 20 dlls are<br>
<br>
iconv.dll<br>
libcairo-2.dll<br>
libffi-6.dll<br>
libgdk_pixbuf-2.0-0.dll<br>
libgio-2.0-0.dll<br>
libglib-2.0-0.dll<br>
libgmodule-2.0-0.dll<br>
libgobject-2.0-0.dll<br>
libgthread-2.0-0.dll<br>
libintl-8.dll<br>
libjpeg-62.dll<br>
libopenjp2.dll<br>
libopenslide-0.dll<br>
libpixman-1-0.dll<br>
libpng16-16.dll<br>
libsqlite3-0.dll<br>
libtiff-5.dll<br>
libxml2-2.dll<br>
openslide-jni.dll<br>
zlib1.dll<br>
<br>
Maybe I miss one?<br>
<br>
Another question related to that is:<br>
<br>
How can I DllImport those libraries? E.g. which function provides libcairo-2.dll?<br>
<br>
[DllImport("libcairo-2.dll")]<br>
private static extern whichFunctionshouldBeHere(WhichArguments);<br>
<br>
<br>
Best,<br>
Peter<br>
<br>
<br>
-----Original Message-----<br>
From: openslide-users [mailto:<a href="mailto:openslide-users-bounces%2Bschueffp">openslide-users-bounces+schueffp</a>=<a href="mailto:mskcc.org@lists.andrew.cmu.edu">mskcc.org@lists.andrew.cmu.edu</a>] On Behalf Of Benjamin Gilbert via openslide-users<br>
Sent: Wednesday, June 15, 2016 3:01 AM<br>
To: <a href="mailto:openslide-users@lists.andrew.cmu.edu">openslide-users@lists.andrew.cmu.edu</a><br>
Subject: Re: Native dll in c# web app<br>
<br>
On Mon, Jun 13, 2016 at 09:59:45PM +0000, Peter via openslide-users wrote:<br>
> I try to make a .net webapp for a openslide viewer. Openslide depends<br>
> on<br>
> 20 native c++ libraries which i cannot reference in the c# project<br>
> (visual studio 2015). (iconv.dll, libtiff-5.dll, ...)<br>
><br>
> It keeps saying that those libraries are not a valid COM assembly. Or<br>
> that they do not have an entry point.<br>
><br>
> In a normal C# app, I simply would copy the dlls to the /bin folder.<br>
> Then they are loaded when the program starts. However, this does not<br>
> work for a webapp (it keeps saying that openslide or one of its<br>
> dependencies is not found).<br>
<br>
Hi Peter,<br>
<br>
I'm not very familiar with Visual Studio, but you may be able to fix this by having it copy the DLLs for you:<br>
<br>
<a href="http://stackoverflow.com/a/35960868/" rel="noreferrer" target="_blank">http://stackoverflow.com/a/35960868/</a><br>
<a href="http://stackoverflow.com/a/5107759/" rel="noreferrer" target="_blank">http://stackoverflow.com/a/5107759/</a><br>
<br>
Does that work?<br>
<br>
--Benjamin Gilbert<br>
_______________________________________________<br>
openslide-users mailing list<br>
<a href="mailto:openslide-users@lists.andrew.cmu.edu">openslide-users@lists.andrew.cmu.edu</a><br>
<a href="https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users" rel="noreferrer" target="_blank">https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users</a><br>
<br>
=====================================================================<br>
<br>
Please note that this e-mail and any files transmitted from<br>
Memorial Sloan Kettering Cancer Center may be privileged, confidential,<br>
and protected from disclosure under applicable law. If the reader of<br>
this message is not the intended recipient, or an employee or agent<br>
responsible for delivering this message to the intended recipient,<br>
you are hereby notified that any reading, dissemination, distribution,<br>
copying, or other use of this communication or any of its attachments<br>
is strictly prohibited. If you have received this communication in<br>
error, please notify the sender immediately by replying to this message<br>
and deleting this message, any attachments, and all copies and backups<br>
from your computer.<br>
_______________________________________________<br>
openslide-users mailing list<br>
<a href="mailto:openslide-users@lists.andrew.cmu.edu">openslide-users@lists.andrew.cmu.edu</a><br>
<a href="https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users" rel="noreferrer" target="_blank">https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users</a><br>
</blockquote></div>