## Printer Device Driver

[prev][next][parent][TOC]

### GplThreadCreateInstance

Description

This function is used to allocate and initialize thread instance data. This function must be called before making any other thread calls in order to get a thread instance handle (HTHREAD). Semaphores and buffers are not created or allocated by this call.

Format

    BOOL APIENTRY GplThreadCreateInstance( HMCB      hMcb

                                           HMODULE   hMod,

                                           HTHREAD   *phThread,

                                           PVOID     pvUserData );

Parameters

hMcb (HMCB) Handle to the memory control block (See Memory Management).

hMod (HMODULE) Handle of calling module. Used for exception management and error logging.

*phThread (HTHREAD)-output Thread instance handle.

pvUserData (PVOID)-output This is used in debugging and is optional. It is recommended that you place a helpful pointer, such as your pddc or pdb pointer.

Returns

Success TRUE
Failure FALSE