자네, 이제 슬슬 먹고 살아야 할 걱정을 해야 할 때가 아닌가? 어억... 이상하게 이미지랑 매칭되네.. ㅈㅅㅈㅅ
by lipprince

[MSDN - VC6.0] AfxBeginThread
 

AfxBeginThread

CWinThread* AfxBeginThread( AFX_THREADPROC pfnThreadProc, LPVOID pParam, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );

CWinThread* AfxBeginThread( CRuntimeClass* pThreadClass, int nPriority = THREAD_PRIORITY_NORMAL, UINT nStackSize = 0, DWORD dwCreateFlags = 0, LPSECURITY_ATTRIBUTES lpSecurityAttrs = NULL );

Return Value

Pointer to the newly created thread object.

Parameters

pfnThreadProc

Points to the controlling function for the worker thread. Cannot be NULL. This function must be declared as follows:

UINT MyControllingFunction( LPVOID pParam );

pThreadClass

The RUNTIME_CLASS of an object derived from CWinThread.

pParam

Parameter to be passed to the controlling function as shown in the parameter to the function declaration in pfnThreadProc.

nPriority

The desired priority of the thread. If 0, the same priority as the creating thread will be used. For a full list and description of the available priorities, seeSetThreadPriority in the Win32 Programmer’s Reference.

nStackSize

Specifies the size in bytes of the stack for the new thread. If 0, the stack size defaults to the same size stack as the creating thread.

dwCreateFlags

Specifies an additional flag that controls the creation of the thread. This flag can contain one of two values:

  • CREATE_SUSPENDED   Start the thread with a suspend count of one. The thread will not execute until ResumeThread is called.

  • 0   Start the thread immediately after creation.

lpSecurityAttrs

Points to a SECURITY_ATTRIBUTES structure that specifies the security attributes for the thread. If NULL, the same security attributes as the creating thread will be used. For more information on this structure, see the Win32 Programmer’s Reference.

Remarks

Call this function to create a new thread. The first form of AfxBeginThread creates a worker thread. The second form creates a user-interface thread.

AfxBeginThread creates a new CWinThread object, calls its CreateThread function to start executing the thread, and returns a pointer to the thread. Checks are made throughout the procedure to make sure all objects are deallocated properly should any part of the creation fail. To end the thread, call AfxEndThread from within the thread, or return from the controlling function of the worker thread.

For more information on AfxBeginThread, see the articlesMultithreading: Creating Worker Threads andMultithreading: Creating User-Interface Threads in Visual C++ Programmer’s Guide.

by mindgear | 2008/04/22 17:13 | MSDN | 트랙백
트랙백 주소 : http://lipprince.egloos.com/tb/266981
☞ 내 이글루에 이 글과 관련된 글 쓰기 (트랙백 보내기) [도움말]
※ 로그인 사용자만 덧글을 남길 수 있습니다.
◀ 이전 페이지 다음 페이지 ▶
카테고리
잡다한 일상
Project
MFC
API
MSDN
Python
Tool
기타등등

최근 등록된 덧글

최근 등록된 트랙백

이전 블로그
more...

이글루 링크


rss

skin by black