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

📄 launch1.cpp

📁 window下的多线程编程参考书。值得一读
💻 CPP
字号:
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <process.h>

int main(void) {
    STARTUPINFO si;
    PROCESS_INFORMATION pi;

    // fill out the STARTUPINFO structure with default values...
    ZeroMemory( &si, sizeof(si));
    si.cb = sizeof(si);

    // start notepad...
    CreateProcess( NULL, "notepad.exe", NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);

    // print some information...
    printf( "Notepad created as process id 0x%08x and thread id 0x%08x.\n", 
            pi.dwProcessId, pi.dwThreadId);

    // close the newly created process and thread handles...
    // this will NOT terminate notepad, it merely closes
    // this process's handles to notepad's process and thread...
    CloseHandle(pi.hProcess);
    CloseHandle(pi.hThread);

    return 0;
}

⌨️ 快捷键说明

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