OK! [DllImport("fplib.dll", EntryPoint="FPMGetImage", SetLastError=true, CharSet=CharSet.Ansi, ExactSpelling=true, CallingConvention=CallingConvention.StdCall)] public static extern int FPMGetImage([In, Out] byte[] buffer); This code run perfectly! THANKS FOR ALL!! Matthew Hazlett wrote: I asked somthing like this the other day, heres what Heath Stewert told me: >Instead of passing byte* as the parameter, declare your parameter using either ref or out >for value types (like a Byte). This is the most common method. > >For instance, if the C functions is declared like so:void SomeFunc(byte* b); >...declare your method like so:[DllImport("...")]private static extern void SomeFunc(ref byte b); >Microsoft MVP, Visual C# >My Articles Matthew Hazlett Windows 2000/2003 MCSE Never got an MCSD, go figure... Alexsander "Axia" Antunes