函数原型:DWORD GetLogicalDrives(VOID);The GetLogicalDrives function retrieves a bitmask representing the currently available disk drives. 说明:该函数用法简单,没有参数,返回值为DWORD类型,返回的是当前驱动器的位掩码,0位代表A盘,1位代表B盘,以此类推,以我的笔记本为例:我的笔记本盘符有C , D , E , F, 还有一个DVD RW驱动器(H). 当执行下面…
先看定义:BOOL GetVolumeInformation(    [IN]  LPCTSTR lpRootPathName,           // root directory  卷所在的根目录,如:"C:\\", 如果为NULL,表示当前目录  [OUT]  LPTSTR lpVolumeNameBuffer,        // volume name buffer ,输出参数,存放卷名缓冲区  [IN]  DWORD nVolumeNameSize,           …
函数原型:DWORD GetLogicalDriveStrings(  DWORD nBufferLength,  // size of buffer                                                           LPTSTR lpBuffer       // drive strings buffer                                                       );说明:参数不多讲,需要注意函…
函数原型: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…
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…
1.获得程序自身的路径: DWORD GetModuleFileName( HMODULE hModule, // handle to module LPTSTR lpFilename, // path buffer DWORD nSize // size of buffer );参数说明:hModudle :[in] Handle to the module whose path is being requested. If this parameter is NULL, GetModuleF…
函数原型: BOOL GetVolumeNameForVolumeMountPoint(                                                                            IN  LPCTSTR lpszVolumeMountPoint, // volume mount point or directory                                                              …
相关函数:HANDLE FindFirstVolumeMountPoint(                                                               LPTSTR lpszRootPathName,     // volume name                                                              LPTSTR lpszVolumeMountPoint, // output buffe…
函数定义:Retrieves the name of a volume on a computer. FindFirstVolume is used to begin scanning the volumes of a computer. HANDLE WINAPI FindFirstVolume( _Out_ LPTSTR lpszVolumeName, _In_  DWORD  cchBufferLength );说明: 检索本机卷的名字,但这个名字是GUID(全局唯一标志符)路径的,可见卷…
上一篇介绍了MoveFile,这次分析MoveFileEx,它是MoveFile的扩展函数,功能还要更加强大些.先看定义: BOOL WINAPI MoveFileEx( _In_     LPCTSTR lpExistingFileName, _In_opt_ LPCTSTR lpNewFileName, _In_     DWORD   dwFlags );返回值: 成功返回1, 失败返回0这里只介绍dwFlags参数:dwFlags:设置移动标志,指明要怎样操作文件或者目录.取值可以有:M…