Creates an asynchronous thread of processing under the current process.

#define INCL_DOSPROCESS
#include <os2.h>

PTID         ptid;     /*  Address of a doubleword where the thread identifier of the created thread is returned. */
PFNTHREAD    pfn;      /*  Address of the code to be executed when the thread begins execution. */
ULONG        param;    /*  An argument that is passed to the target thread routine as a parameter. */
ULONG        flag;     /*  Thread flags. */
ULONG        cbStack;  /*  The size, in bytes, of the new thread's stack. */
APIRET       ulrc;     /*  Return Code. */

ulrc = DosCreateThread(ptid, pfn, param, flag,
         cbStack);


[Back] [Next]