원본 : http://www.debuglab.com/knowledge/fork.html
1.요약
자기 프로세스의 복사본을 만드는 방법을 설명.
2.본문
UNIX에서는 fork라는 함수를 이용하여 자기자신의 복사본을 만듭니다. 윈도우에서는 이런 기능이 없는데 CreateProcess를 이용하여 비슷한 기능을 만들수 있습니다.
3.예제
- 2001.08.06 Smile Seo -
1.요약
자기 프로세스의 복사본을 만드는 방법을 설명.
2.본문
UNIX에서는 fork라는 함수를 이용하여 자기자신의 복사본을 만듭니다. 윈도우에서는 이런 기능이 없는데 CreateProcess를 이용하여 비슷한 기능을 만들수 있습니다.
3.예제
void CMainFrame::OnAppClone()
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
// Initialize the STARTUPINFO structure.
memset(&si, 0, sizeof(si));
si.cb = sizeof(si);
CreateProcess(
NULL, // pointer to name of executable module
(LPTSTR) AfxGetApp()->m_pszAppName,
// pointer to command line string
NULL, // pointer to process security attributes
NULL, // pointer to thread security attributes
FALSE, // handle inheritance flag
0, // creation flags
NULL, // pointer to new environment block
NULL, // pointer to current directory name
&si, // pointer to STARTUPINFO
&pi // pointer to PROCESS_INFORMATION
);
}
- 2001.08.06 Smile Seo -
"MFC" 카테고리의 다른 글
- 윈앰프처럼 TaskBar와 SystemTray 마음대로 주무루기 (0)2007/02/22
- 일반적인 Child Window 만들기 (0)2007/02/21
- 자기 프로세스의 복사본을 만드는 방법 (0)2007/02/21
- 사용자 정의 Common Dialog 만들기 (0)2007/02/21
- 초 간단!! 시스템 이미지 리스트 얻어오기 (0)2007/02/21
Tags 프로세스 복사본

수안이의 컴퓨터 연구실



Leave your greetings.