在WinNT里,对端口读写操作可用哪些函数?
解决方案 »
- 创建非模态对话框的饿问题
- opencv结合ftp传输视频的问题
- 请教高手,几个状态的区别
- 急救:!我用ADO连接ORACLE,读取BLOB字段,出现数据类型不被支持。为什么阿?~!快帮帮我吧
- 大致说来,哪些类是MFC的,哪些类是WINDOWS的?
- fatal error C1010: unexpected end of file while looking for precompiled header directive
- 一个简单的sql语句
- 一个问题很困惑,大侠指点! @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
- 关于CTime::GetCurrentTime得到的时间——为什么我得到的是错误的,随机的时间?
- _asm,帮忙看一下这段程序!
- 谁能帮帮我这个菜鸟?
- 是否可以在脚本中实现自定义ActiveX控件的消息接收???
m_hCommDev = ::CreateFile("COM1", // string of serial port device's name
GENERIC_READ|GENERIC_WRITE, // access mode
0, // MUST! no Share, exclusive access
NULL, // no security attribute
OPEN_EXISTING, // MUST! refered device must exist
FILE_ATTRIBUTE_NORMAL, // device attributes
NULL); // MUST! no copy...// read from serial port
::ReadFile(m_hCommDev, pbyBlock, dwLength, &dwRealRead, NULL);// write to serial port
::WriteFile(m_hCommDev, pbyBlock, dwLength, &dwRealWrite, NULL);...// release the reference to serial port
::CloseHandle(m_hCommDev);