⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 handle.c

📁 SimpleGraphicOperatingSystem 32位图形化操作系统 多进程 支持FAT32 详见www.sgos.net.cn
💻 C
字号:
#include <api.h>
#include <stdio.h>
#include <windows.h>


//可以关闭各种句柄
/*
Access token,Communications device ,Console input ,Console screen buffer ,Event 
,File ,File mapping ,Job ,Mailslot ,Memory resource notification ,Mutex 
,Named pipe ,Pipe ,Process ,Semaphore ,Socket ,Thread ,Transaction ,Waitable timer */
BOOL WINAPI CloseHandle(
  HANDLE hObject
){
    printf("CloseHandle: 0x%X\n", hObject );
    return TRUE;
}

//等待对象 
DWORD WINAPI WaitForMultipleObjects(
  DWORD nCount,
  const HANDLE* lpHandles,
  BOOL bWaitAll,
  DWORD dwMilliseconds
){
    printf("WaitForMultipleObjects: %d, 0x%X, %d, %d\n", 
        nCount,lpHandles, bWaitAll,dwMilliseconds );
    return 0;
}
/*
STD_INPUT_HANDLE
(DWORD)-10 Handle to the standard input device. Initially, this is a handle to the console input buffer, CONIN$. 
STD_OUTPUT_HANDLE
(DWORD)-11 Handle to the standard output device. Initially, this is a handle to the active console screen buffer, CONOUT$. 
STD_ERROR_HANDLE
(DWORD)-12 Handle to the standard error device. Initially, this is a handle to the active console screen buffer, CONOUT$. 
*/
HANDLE WINAPI GetStdHandle(
  DWORD nStdHandle
){
    printf("GetStdHandle %d\n", nStdHandle );
    return 2;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -