Tutorial by Examples

This example starts Notepad, waits for it to be closed, then gets its exit code. #include <Windows.h> int main() { STARTUPINFOW si = { 0 }; si.cb = sizeof(si); PROCESS_INFORMATION pi = { 0 }; // Create the child process BOOL success = CreateProcessW( L"C:...
#include <Windows.h> DWORD WINAPI DoStuff(LPVOID lpParameter) { // The new thread will start here return 0; } int main() { // Create a new thread which will start at the DoStuff function HANDLE hThread = CreateThread( NULL, // Thread attributes ...

Page 1 of 1