【Windows API一日一练 46 EnterCriticalSection和LeaveCriticalSection】教程文章相关的互联网学习教程文章

windows API 第22篇 WTSGetActiveConsoleSessionId

函数原型: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 it is not necessary that Terminal Services be running for this function to succeed. 该函数可以用来获取当前活动的会话ID,有时候我们通过...

windows API 第13篇 MoveFileEx【代码】

上一篇介绍了MoveFile,这次分析MoveFileEx,它是MoveFile的扩展函数,功能还要更加强大些。先看定义: BOOL WINAPI MoveFileEx(_In_ LPCTSTR lpExistingFileName,_In_opt_ LPCTSTR lpNewFileName,_In_ DWORD dwFlags );返回值: 成功返回1, 失败返回0这里只介绍dwFlags参数:dwFlags:设置移动标志,指明要怎样操作文件或者目录。取值可以有:MOVEFILE_COPY_ALLOWED:当需要移动文件到不同的盘符时需要指定此值,不...

Windows API 第二篇 SHGetSpecialFolderPath【图】

BOOL SHGetSpecialFolderPath( HWND hwndOwner, LPTSTR lpszPath, int nFolder, BOOL fCreate ); 参数解释: hwndOwner:Handle to the owner window the client should specify if it displays a dialog box or message box. lpszPath:Pointer to a null-terminated string that receives the drive and path of the speci...