# ThreadObject_Win32 Class Reference

Win32 thread version for ThreadObject. More...

Inheritance diagram for ThreadObject_Win32:

## Public Member Functions
| ThreadObject_Win32 (OTTDThreadFunc proc, void *param, bool self_destruct)
| Create a win32 thread and start it, calling proc(param).
bool | Exit ()
| Exit this thread.
void | Join ()
| Join this thread.
## Private Member Functions
void | ThreadProc ()
| A new thread is created, and this function is called.
## Static Private Member Functions
static uint CALLBACK | stThreadProc (void *thr)
| On thread creation, this function is called, which calls the real startup function.
## Private Attributes
HANDLE | thread
| System thread identifier.
uint | id
| Thread identifier.
OTTDThreadFunc | proc
| External thread procedure.
void * | param
| Parameter for the external thread procedure.
bool | self_destruct
| Free ourselves when done?

## Detailed Description

Win32 thread version for ThreadObject.

Definition at line 16 of file thread_win32.cpp.

## Member Function Documentation

static uint CALLBACK ThreadObject_Win32::stThreadProc | ( | void * | thr | ) | `[inline, static, private]`

On thread creation, this function is called, which calls the real startup function.

This to get back into the correct instance again.

Definition at line 67 of file thread_win32.cpp.

Referenced by ThreadObject_Win32().

void ThreadObject_Win32::ThreadProc | ( |  | ) | `[inline, private]`

A new thread is created, and this function is called.

Call the custom function of the creator of the thread.

Definition at line 77 of file thread_win32.cpp.

References param, proc, and self_destruct.

The documentation for this class was generated from the following file:

- src/thread_win32.cpp