How to access c++ dl function in c# webservices

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?a3VtYXI=?=

    How to access c++ dl function in c# webservices

    I have used vb_dll.dll. It is refering to particular dll

    [DllImport(@"E:\ LicenseProject\ LicenseWebServi ceProtoType\bin \vb_dll.dll",
    CharSet = CharSet.Ansi, SetLastError = true, ExactSpelling = true,
    CallingConventi on = CallingConventi on.StdCall)]
    public static extern int lp_hostid(int HostType,
    StringBuilder hostidstr);


    It refers particular dll but when we try to access lp_hostid() function with
    proper parameter in webservices like

    lp_hostid(vb_dl l_interface.HOS TID_ETHER, temp);

    It is providing following error
    "Attempted to read or write protected memory. This is often an indication
    that other memory is corrupt."

    It is working fine with web application but not in web services.

    It is very urgent. Any body help is most appreciated.


    --
    It has very good site to post question and take question to resolve issues.
Working...