BeginthreadThe beginthread function creates a new thread of execution within the current process. It is part of the Microsoft Windows runtime library and is declared in the process.h header file. Prototypeunsigned long _beginthread(void(* Func)(void*), unsigned Stack_size, void *Arg);
FuncThread execution starts at the beginning of the function Stack_sizeThe operating system allocates a stack for the thread containing the number of bytes specified by ArgThe operating system passes Arg to Func when execution begins. Return valueReturns the operating system handle of the newly created thread. If unsuccessful, the function returns −1 and sets errno. Compiler switchesTo compile a program using multiple threads with the Microsoft C/C++ Compiler, you must specify the /MT switch (or /MTd, for debug programs). References |
Portal di Ensiklopedia Dunia