Public Declare Function ReadFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToRead As Long, lpNumberOfBytesRead As Long, ByVal lpOverlapped As Long) As Long
Public Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Long) As Long最后的参数为0便可以了!
Public Declare Function WriteFile Lib "kernel32" (ByVal hFile As Long, lpBuffer As Any, ByVal nNumberOfBytesToWrite As Long, lpNumberOfBytesWritten As Long, ByVal lpOverlapped As Long) As Long最后的参数为0便可以了!
解决方案 »
- VC中弹出对话框后怎么才能让桌面点击不了
- VC6写的程序如何做安装程序?
- vc环境使用api编写界面
- 求助:传递的参数都用上了?
- 简单而奇怪大打印设置问题。快疯了。
- 怎样修改窗口的标题
- 急急急!
- 怎么把 CString 的对象 转换为 CTime 对象
- 有关link之后,出现错误 "symbol "struct reflist *ref" have already in ???.obj"的问题
- 我想把一个类中的数组传到另外一个类中,怎么实现啊,
- “What’s It Like to Use One?”该怎么翻译?
- 请问使用MFC如何编写可带参数的程序,如程序名为exam,可以在windows运行中输入exam a
一般是设置为NULL的,除非比较特殊的情况。
BOOL WriteFile(
HANDLE hFile, // handle to file to write to
LPCVOID lpBuffer, // pointer to data to write to file
DWORD nNumberOfBytesToWrite, // number of bytes to write
LPDWORD lpNumberOfBytesWritten, // pointer to number of bytes written
LPOVERLAPPED lpOverlapped // pointer to structure for overlapped I/O
);
第一参数:句炳;
第二参数:数据缓冲区;
第三参数:写入的字节个数
第四参数:实际写入的字节个数
第五参数:设置为NULL好了。