Native dll in c# web app
Angelos Pappas
angelos at smartcode.gr
Wed Jun 15 04:28:21 EDT 2016
Hi Peter,
you cannot reference these DLLs directly within C# as these are not .Net
assemblies, but simple windows DLLs. You have to write a C# wrapper
around them and invoke them with platform invoke.
Here's some more info:
https://msdn.microsoft.com/en-us/library/aa288468(v=vs.71).aspx
Search for "C# platform invoke" and you will get the idea.
Regards
Angelos
On 14/6/2016 00:59, Peter via openslide-users wrote:
> Hello,
>
> I try to make a .net webapp for a openslide viewer. Openslide depends on 20 native c++ libraries which i cannot reference in the c# project (visual studio 2015). (iconv.dll, libtiff-5.dll, ...)
>
> It keeps saying that those libraries are not a valid COM assembly. Or that they do not have an entry point.
>
> In a normal C# app, I simply would copy the dlls to the /bin folder. Then they are loaded when the program starts. However, this does not work for a webapp (it keeps saying that openslide or one of its dependencies is not found).
>
> Is there a way to generate valid COM assembly dlls which can be referenced in VS15 in the project?
>
> Or can I maybe rebuild the dlls (how)?
>
> Thanks,
> Peter
> =====================================================================
>
> Please note that this e-mail and any files transmitted from
> Memorial Sloan Kettering Cancer Center may be privileged, confidential,
> and protected from disclosure under applicable law. If the reader of
> this message is not the intended recipient, or an employee or agent
> responsible for delivering this message to the intended recipient,
> you are hereby notified that any reading, dissemination, distribution,
> copying, or other use of this communication or any of its attachments
> is strictly prohibited. If you have received this communication in
> error, please notify the sender immediately by replying to this message
> and deleting this message, any attachments, and all copies and backups
> from your computer.
> _______________________________________________
> openslide-users mailing list
> openslide-users at lists.andrew.cmu.edu
> https://lists.andrew.cmu.edu/mailman/listinfo/openslide-users
More information about the openslide-users
mailing list