C # Web service referencing a C # project referencing a DLL

Well, this may not be practical, but I'm writing a web service for an existing application. I am trying to use the C # library that we wrote for a project, and that the C # library uses functions from a dll that are not related to a .NET project. I know that a DLL is not a problem because the actual application (a Windows form application) that uses the C # library does not have problems with the operations that use this DLL, but my web service always fails when calling the dll methods. The exception is:

"Unable to load DLL 'foo.dll': the specified module could not be found. (Exception from HRESULT: 0x8007007E)"} System.Exception {System.DllNotFoundException}

Sample import from C # library:

[DllImport("foo.dll")]
protected static extern void DllFunction(string param1, int param2, int param3);

I tried adding foo.dll to the Bin directory of my project, but this did not work. I feel like I should be missing out on something really obvious. Any suggestions? I read some funky things about DLLs and web services and tried a couple of fixes like http://sites.google.com/site/tosapage/programming/asp-net#dll , but they didn’t work.

+3
source share
1 answer

I would run winforms exe with depend.exe . Perhaps you get this error for dell, which dll you are calling.

+2
source

All Articles