'out' keyword in methodes param

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have the following dll function:
RW_DLL_API int ReadBDll(DWORD Address, DWORD NumOfUnits, BYTE * val)

From my C# application I call this one as following :

[DllImport("RW_DLL.dll")]
extern static int ReadBDll(UInt32 Address, UInt32 NumOfUnits, out byte [] Block);
byte [] arr = new byte[5];
int i = ReadBDll(0x2e,1, 5,out arr );
but after execution the function I got the following 'arr' value = <Undefined value> why ?????????????????????
 
I have the following dll function:
RW_DLL_API int ReadBDll(DWORD Address, DWORD NumOfUnits, BYTE * val)

From my C# application I call this one as following :

[DllImport("RW_DLL.dll")]
extern static int ReadBDll(UInt32 Address, UInt32 NumOfUnits, out byte [] Block);
byte [] arr = new byte[5];
int i = ReadBDll(0x2e,1, 5,out arr );
but after execution the function I got the following 'arr' value =
<Undefined value> why ?????????????????????

I suspect that the method has effectively set the value to null
somewhere.
 
Back
Top