Re: Accessing Unmanaged code from ASP.net
- From: "Vadym Stetsyak" <vadym_s@xxxxxxx>
- Date: Thu, 3 Nov 2005 19:26:19 +0200
in the web application context you may have no access to
C:\ProcessCommand.dll
Try to put this dll into the same folder where .net assembly you're
p/invoking from is located.
--
Vadym Stetsyak aka Vadmyst
http://vadmyst.blogspot.com
<admiller97@xxxxxxxxx> wrote in message
news:1130970698.000409.293730@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> I've got some code to access an unmanaged dll, and it works fine in a
> windows based app, but when I move the code to a web application it
> does not work. It does not throw an error, it acts like the code never
> gets called.
>
> private class dllWrap
> {
> [DllImport("C:\\ProcessCommand.dll")]
> public static extern void ProcessCommand(IntPtr str);
> }
> private void SendCmd(string command)
> {
> IntPtr str = Marshal.StringToHGlobalAnsi(command);
> dllWrap.ProcessCommand(str);
> }
> protected void Button1_Click(object sender, EventArgs e)
> {
> this.SendCmd("WORKED");
> }
>
.
- References:
- Accessing Unmanaged code from ASP.net
- From: admiller97
- Accessing Unmanaged code from ASP.net
- Prev by Date: Re: Implementing ADSI and using System.DirectoryServices
- Next by Date: Re: sending files in C#
- Previous by thread: Accessing Unmanaged code from ASP.net
- Next by thread: RE: Transfer protected media file license to device
- Index(es):