Win32 multi-threaded learning notes (1)

xiaoxiao2021-03-06  35

1:

Handle

CreateThread

LPSecurity_attributes

LPTHREADATTRIBUTES

,

Size_t

DWSTACKSIZE

,

LPTHREAD_START_ROUTINE LPSTARTDRESS

,

LPVOID

LPParameter

,

DWORD

DWCREATIONFLAGS

,

LPDWORD LPTHREADID

);

A: The third parameter is a function pointer, pointing to some specific function, the call agreement is

WinAPI / / # Define WinAPI __stdcall,

The parameter LPVOID guarantees the legality of the function. B: two functions to get two values: The first value is Handle, most and thread-related API functions; the second is the value of the parameter threadID It is unique to represent a thread in a process. Description: We cannot get from a thread to get its handle.2: bool closehandle (Handle Hobject); used to release the core object.

转载请注明原文地址:https://www.9cbs.com/read-61928.html

New Post(0)