函数原型:BOOL DeleteVolumeMountPoint(                                                      LPCTSTR lpszVolumeMountPoint  // volume mount point path                                                   ); 参数:lpszVolumeMountPoint  :挂载点路径,必须以反斜杠'\'结尾. [in] Poi…
函数原型:BOOL SetVolumeMountPoint(                                                   IN   LPCTSTR lpszVolumeMountPoint, // mount point                                                 IN   LPCTSTR lpszVolumeName        // volume to be mounted             …
上一篇介绍了MoveFile,这次分析MoveFileEx,它是MoveFile的扩展函数,功能还要更加强大些.先看定义: BOOL WINAPI MoveFileEx( _In_     LPCTSTR lpExistingFileName, _In_opt_ LPCTSTR lpNewFileName, _In_     DWORD   dwFlags );返回值: 成功返回1, 失败返回0这里只介绍dwFlags参数:dwFlags:设置移动标志,指明要怎样操作文件或者目录.取值可以有:M…
函数原型:DWORD WTSGetActiveConsoleSessionId (VOID)先看一下原文介绍: The WTSGetActiveConsoleSessionId function retrieves the Terminal Services session currently attached to the physical console. The physical console is the monitor, keyboard, and mouse. Note that…
函数原型: BOOL GetVolumeNameForVolumeMountPoint(                                                                            IN  LPCTSTR lpszVolumeMountPoint, // volume mount point or directory                                                              …
相关函数:HANDLE FindFirstVolumeMountPoint(                                                               LPTSTR lpszRootPathName,     // volume name                                                              LPTSTR lpszVolumeMountPoint, // output buffe…
函数定义:BOOL DeleteAndRenameFile( LPCWSTR lpszDestFile,                                                    LPCWSTR lpszSourFile                                                );说明:函数把sourceFile的内容复制到DestFile中,然后再删除sourceFile.调用前必须保证sourceFile和DestFile都存…
MoveFile可以移动文件,更名文件,移动目录(包括目录下的所有文件以及子目录).函数定义:BOOL MoveFile(  LPCTSTR lpExistingFileName, // file name                             LPCTSTR lpNewFileName       // new file name); 参数不介绍了,一个指向source 一个指向destination.返回值:成功返回1,失败返回0:说明:    1:不管移动文件还是移动目录…
GetLocalTime获取系统时间信息.函数原型:VOID   WINAPI  GetLocalTime(    __out LPSYSTEMTIME lpSystemTime    ); 先来看SYSTEMTIME结构:typedef struct _SYSTEMTIME {    WORD wYear;    WORD wMonth;    WORD wDayOfWeek;    WORD wDay;    WORD wHour;    WORD wMinute;    WORD wSec…
创建或打开文件(也可用于打开管道,油槽,硬件设备等): HANDLE CreateFile( LPCTSTR lpFileName, // file name DWORD dwDesiredAccess, // access mode DWORD dwShareMode, // share mode LPSECURITY_ATTRIBUTES lpSecurityAttributes, // SD DWORD dwCreationDisposition, // how to create DWO…