Passing this pointer to CreateThread in class constructor behaves wired in thread procedure
===

In the constructor of one of my classes I call the Windows function 'CreateThread' as last operation. The thread is created to execute immediately and I pass the this pointer of my class as 'lpParameter'.

In the thread procedure I cast the parameter passed back to a pointer of my class and name it 'pThis'.

I can see that 'pThis' points to the **same memory location** as the 'this' pointer I passed when I called 'CreateThread'. However if I look at the member variables accessed by 'pThis->...' they all have wrong values.

I expected the value of 'this->member_variable' used in the class to which the this pointer belongs to be the same as the one I get when writing 'pThis->member_variable' in the thread's procedure.

If I call 'CreateThread' in another member function (**not** the constructor) everything behaves correctly.

Hence the question: Is it forbidden to call the Windows function 'CreateThread' from within the constructor of a C++ class? If yes, what is the problem?