那它返回0即NULL又是怎么回事呢?
解决方案 »
- 用gdi+填充圆环或扇形问题
- DFView看doc文件里面流的名字是|开头的,但是编程输出的话,打印出来的|却是个奇怪的ASCII字符
- 如何更改ListView控件的行颜色,SDK方式的。
- OLE DB 访问Access MovePrev() 怎么用?为什么我的不用能?
- 这样设计有没问题?
- 怎么自画report型的CListCtrl的SubItem?
- 如何获取硬盘和CPU的序列号?
- 如何用WinExec或ShellExecute执行Net Send(已知IP和发送内容)
- 谁有EXcel的文件格式,或者有能直接把数据库保存成xls文件的控件
- FIFA2001安装后不能用,错误如下,请指点,解决就给分!
- 请大家推荐一款定时的英文软件!(急!!!)
- 小弟初学vc,有些不知道的地方很多,希望能结交一些高手,给予指点。
返回0时表示成功~
LPCTSTR lpFileName, // file name
DWORD dwDesiredAccess, // access mode
DWORD dwShareMode, // share mode
LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD
DWORD dwCreationDisposition, // how to create
DWORD dwFlagsAndAttributes, // file attributes
HANDLE hTemplateFile // handle to template file
);Return Values
If the function succeeds, the return value is an open handle to the specified file. If the specified file exists before the function call and dwCreationDisposition is CREATE_ALWAYS or OPEN_ALWAYS, a call to GetLastError returns ERROR_ALREADY_EXISTS (even though the function has succeeded). If the file does not exist before the call, GetLastError returns zero. If the function fails, the return value is INVALID_HANDLE_VALUE. To get extended error information, call GetLastError.
CreateFile()最常见的错误返回值;
这是这个API和其他不同之处,熟悉File(或IO操作)操作都应该了解。