locked
asp.net website call c++ dll (HELP~~) RRS feed

  • Question

  • User-2029892244 posted

    Hi guys, I am working on asp.net website call c++ dll.

    First I mad a test that I built a winform and call the c++ dll, it works , like this:

    (1)

    class CPPDLL
    {

    [DllImport("parse.dll", CallingConvention = CallingConvention.Cdecl)]
    public static extern IntPtr parseNC(string fileName);

    }

    (2) I call it

    IntPtr rt = CPPDLL.parseNC("ggg.iso");

    (3)PS: the "parse.dll" also call other dlls, and I have put them correctlly with the parse.dll

     I mean "my.exe","parse.dll","other dlls" are all in the same folder, this works well.

    (4)I copy the code to my asp.net project, and put all of the dlls in the  "bin" folder with my "website.dll",

    but my project terminated without any error or execption when I call run it and call the webservice method.

    the BROWSER shows:

    ------------------------------------------------

    This page can't be displayed

    •Make sure the web address http://localhost:49219 is correct.
    •Look for the page with your search engine.
    •Refresh the page in a few minutes.

    --------------------------------------------------

    I really hope some one help me,thank you

    and I will be glad to add some details if you need

    Monday, April 16, 2018 3:19 AM

All replies