调用C DLL从ASP.NET Web服务 [英] Calling C DLL From ASP.NET Web Service

查看:138
本文介绍了调用C DLL从ASP.NET Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这是该项目的总工作流程

Hi this is the total workflow of this project

我们是COBOL编写一个应用程序,凌晨可以使用该应用程序通信仅 C DLL ,这对我们在<$ C调用该方法$ C> DLL 下面

we have a application which is written in cobol, wee can communicate to that application using only a C DLL, the method which we have to call in the dll is given below

[DllImport(@"C:\CCExpert\haz450cp.dll", EntryPoint = "HAZ450CP", CallingConvention = CallingConvention.Cdecl)]
    unsafe public static extern void HAZ450CP(ref p45_control p45_controlx, out p45_clreturn p45_clreturnx, ref p45_clclaim p45_clclaimx);

我们所做的事情是,我们调用了 C DLL C#DLL ,这个 C#DLL 工作的罚款与控制台应用程序,这意味着我们可以给输入到它,我们都可以从控制台应用程序适当的输出也。

what we did is we are invoking that C dll from a C# DLL, this C# dll working fine with console application, it means we can give the input to it and we are getting proper output also from console application.

但是,当我尝试调用同一个 C#DLL ASP.NET的WebService 它给错误

But when i try to call the same C#DLL from the ASP.NET WebService its giving error

感谢

推荐答案

我知道这听起​​来有点傻,但可以将asp.net用户从哪里DLL所在的目录中读取内容?

I know this might sound a little stupid, but can your asp.net user read contents from the directory where the DLL is located?

您可以通过复制你的DLL Web应用程序文件夹的bin目录并从C改变DLL的路径做这个测试:\\ CCExpert \\ haz450cp.DLL只是haz450cp.DLL

You can do this test by copying you DLL to the bin directory of your web application folder and changing the DLL path from C:\CCExpert\haz450cp.DLL to just haz450cp.DLL

这篇关于调用C DLL从ASP.NET Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆