Click here to Skip to main content
12,296,162 members (66,025 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# .NET MVC PDF DLL Delphi

I have a dll made in Delphi and in this dll return some reports.

I'm trying to load this dll and load a report in PDF into my MVC application but actually I don't know how i can do it.

Any help is welcome.

Posted 1-Oct-12 4:08am
Richard MacCutchan 1-Oct-12 11:05am
You need to give some more detail of what you are trying to do and what results you get. What is the format of the data returned from the DLL and how are you trying to convert it to PDF?
Daniel "Jake" S. 2-Oct-12 10:08am
Actually my dll returns a array of byte. I'm trying to load this array in my MVC application with byte[] and doesn't work.

When I try to load it in delphi i've got an access violation error.

I'm using this code to import the dll function :

[DllImport("mydll.dll", CallingConvention = CallingConvention.StdCall)]
public static extern void functionPDF(string param1, string param2, int param3, ref byte[] PDF );

Richard MacCutchan 2-Oct-12 10:24am
Well I would suggest you step through this code with your debugger to find out what the values of all your variables are and which one of them is causing the access violation.
Daniel "Jake" S. 2-Oct-12 10:33am
is the PDF variable ... when I try to do the command "SetLength" in delphi
Richard MacCutchan 2-Oct-12 10:41am
I have no idea what that means.
...and first of all, you need to ask a question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.160525.2 | Last Updated 1 Oct 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100