about IC_Read and IC_Read_Hex

  • Thread starter Thread starter Miken
  • Start date Start date
M

Miken

I use vs.net2003.
I can find the following functions in Lkic32.dll:

__int16 __stdcall IC_Read(HANDLE idComDev,__int16 offset,__int16 len,
unsigned char * databuffer);
__int16 __stdcall IC_Read_Hex(HANDLE idComDev,__int16 offset,__int16 len,
unsigned char * databuffer);

In two functions,I can get data from "databuffer" after call them.
Now I make the following declare using C#:

[DllImport("Lkic32.dll")]
public static extern int IC_Read(IntPtr ICDev, int offset, int len, ref
string Databuffer);
[DllImport("Lkic32.dll")]
public static extern int IC_Read_Hex(IntPtr ICDev, int offset, int len, ref
string Databuffer);

I cann't get data from "databuffer" after call them.If offset>0 or len>1,it
appear error.


Please help me,and thanks.
 
Back
Top