extern "C" __declspec(dllimport) int __stdcall  hst_filesend(UCHAR *pname, CINFTBL *cinftbl);
extern "C" __declspec(dllimport) int __stdcall  hst_idtbladd (UCHAR *iddata);
-----------------------------------------------------------------------------byte[]recepath=System.Text.Encoding.Default.GetBytes("c:\\dt900\\rece");
hst_idtbladd(recepath);

[StructLayout(LayoutKind.Sequential)]
public class CINFTBL
{
[MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)]
public byte[] htid;
[MarshalAs(UnmanagedType.ByValArray, SizeConst=2)]
public byte[] htdmy;
public int adv;
public int fileno;
public int filesize;
public int jobcmd;
public int datatype;
}
cinftbl.htid=System.Text.Encoding.Default.GetBytes("&&&&&&");
public class Hostcm32
{
[DllImport("HOSTCM32.DLL",EntryPoint="hst_idtbladd")]
public static extern  int hst_idtbladd (byte[] iddata);
[DllImport("HOSTCM32.DLL",EntryPoint="hst_filesend")]
public static extern  int hst_filesend(byte[] pname,[In, MarshalAs(UnmanagedType.LPStruct)] CINFTBL cinftbl);
}

请高手检查下,有没有问题啊?谢谢啦