logo       

Re: Add dll reference to C# project: msg#00050

lisp.corman

Subject: Re: Add dll reference to C# project

On Tue, 11 Mar 2003 17:53:08 -0800, "Roger Corman" <roger@xxxxxxxxxx>
said:
> You can certainly run it from Visual C++, even from Managed C++ code
> under .NET. However, C++ offers transparent ability to link to Win32 DLLs
> and C# does not. There may be some way to do it but I don't know C# well.

If I recall correctly you need to use a DllImport attribute:

using System.Runtime.InteropServices

class MyClass
{
[DllImport("MyDll.dll",
EntryPoint="FunctionName",
CallingConvention=CallingConvention.StdCall)]
public static extern int FunctionName(int a, int b);
}

Something like that...

Chris.
--
Chris Double
chris.double@xxxxxxxxxxxx

------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get 128 Bit SSL Encryption!
http://us.click.yahoo.com/xaxhjB/hdqFAA/xGHJAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
cormanlisp-unsubscribe@xxxxxxxxxxxxxxx



Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/





<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise