Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is a LPTHREAD_START_ROUTINE?

Tags:

c

winapi

I can't seem to find any documentation for LPTHREAD_START_ROUTINE for the C language.

I found this but it is for .NET Framework 4.5 and it is deprecated: http://msdn.microsoft.com/en-us/library/aa964928.aspx

The reason why I want to know is because I need it for CreateThread: http://msdn.microsoft.com/en-us/library/windows/desktop/ms682453%28v=vs.85%29.aspx

like image 283
user2899050 Avatar asked Oct 20 '13 01:10

user2899050


2 Answers

LPTHREAD_START_ROUTINE is actually documented under the name of ThreadProc:

An application-defined function that serves as the starting address for a thread. Specify this address when calling the CreateThread, CreateRemoteThread, or CreateRemoteThreadEx function.

The LPTHREAD_START_ROUTINE type defines a pointer to this callback function. ThreadProc is a placeholder for the application-defined function name.

like image 198
icktoofay Avatar answered Oct 24 '22 04:10

icktoofay


This is documented here on MSDN. It is a function pointer defined as:

typedef DWORD (__stdcall *LPTHREAD_START_ROUTINE) (
    [in] LPVOID lpThreadParameter
);
like image 20
Reed Copsey Avatar answered Oct 24 '22 03:10

Reed Copsey