一个多功能的函数,可打开或创建以下对象,并返回可访问的句柄:控制台,通信资源,目录(只读打开),磁盘驱动器,文件,邮槽,管道。
HANDLE CreateFile(
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
);
http://baike.baidu.com/link?url=uxqYDuKeAujk1PJAA2AhWvuJt1T9-2LjepZ05aEx27NlYdzGOX9MOh4oH-gsIGU0P6uN5ppguLhHwyCN_jtLS_
点击打开链接