标题:这是什么程序?
取消只看楼主
diheg
Rank: 1
等 级:新手上路
帖 子:17
专家分:0
注 册:2005-3-21
 问题点数:0 回复次数:0 
这是什么程序?
#include<windows.h> #include<stdio.h> void main() { HANDLE FileHandle; DWORD BytesWritten; if((FileHandle=CreateFile("\\\\Myserver\\Myshare\\Sample.txt", GENRIC_WRITE | GENERIC_READ. FILE_SHARE_READ | FILE_SHARE_WRITE,NULL. CREATE_ALWAYS.FILE_ALLRIBUTE_NORMAL,NULL)) ==INVALID_HANDLE_VALUE); {printf("CreateFile failed with error %d\n",GetlastError()); return; } if(WrittnFile(FileHandle,"This is a test",14. &&BytesWritten,NULL)==0) {printf("WriteFile failed with error %d\n",GetlastError()); return; } if(CloseHandle(FileHandle)==0) {printf("CloseHandle failed with error %d\n",GetlastError()); return; } } 谁看的懂~跟我讲讲,谢谢!~并且还有三个错误。我不知道怎么改?
搜索更多相关主题的帖子: windows FileHandle NULL 
2005-03-28 14:28



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-14219-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.058137 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved