what error did you get? permissions problems? look in Keith Brown's new book:http://pluralsight.com/wiki/default.aspx/Keith.GuideBook.HomePage

解决方案 »

  1.   

    also seehttp://weblogs.asp.net/brada/archive/2004/02/06/69095.aspx
      

  2.   

    //给你个例子,仅供参考
    [StructLayout(LayoutKind.Sequential)]
    private struct OVERLAPPED { 
        public int  Internal; 
        public int  InternalHigh; 
        public int  Offset; 
        public int  OffsetHigh; 
        public int hEvent; 
    }  [DllImport("kernel32.dll")]
    private static extern bool ReadFile(
      int hFile,                // 通信设备句柄 handle to file
      byte[] lpBuffer,             // 数据缓冲区 data buffer
      int nNumberOfBytesToRead,  // 多少字节等待读取 number of bytes to read
      ref int lpNumberOfBytesRead, // 读取多少字节 number of bytes read
      ref OVERLAPPED lpOverlapped    // 溢出缓冲区 overlapped buffer
    );
      

  3.   

    http://www.yesky.com/20020307/1600638_1.shtml