I know about using param in C#. But can you read my question carefully?
How to you declare [DllImport(....)] in C# for a C function that takes var
args like:
int _cdecl DoSomething( int abc, ... );
Thanks.
Leon
"David Anton" wrote:
> Try the 'params' keyword.
> --
> http://www.tangiblesoftwaresolutions.com
> C++ to C#
> C++ to VB
> C++ to Java
> VB to Java
> Java to VB & C#
> Instant C#: VB to C#
> Instant VB: C# to VB
> Instant C++: VB, C#, or Java to C++/CLI
>
>
> "Leon" wrote:
>
> > Hi,
> >
> > I have a C exported function in a DLL that has the following proto-type:
> > int _cdecl MyFunction( LPCSTR fmt, ... );
> >
> > Does anyone know the DllImport declaration for this so that I can call this
> > in C#?
> >
> > Thanks.
> >
> > Leon