Q&A

  • 프로그램 종료시..
특정  프로그램을 종료할려고
PostMessage(FindWindow(Nil, 'window caption'), WM_QUIT, 0, 0);
을 보냈는데요.

문제는 프로그램이 종료되면서 '화일을 정말 종료하겠습니까?'라는

메시지창이 뜹니다. 이것마저도 종료시키고 싶거든요.

방법이 없을까요?
1  COMMENTS
  • Profile
    이준원 2004.01.21 01:26


    TerminateProcess를 사용해 보십시요.

    The TerminateProcess function terminates the specified process and all of its threads.

    BOOL TerminateProcess(

        HANDLE hProcess,        // handle to the process
        UINT uExitCode         // exit code for the process  
       );        


    Parameters

    hProcess

    Identifies the process to terminate.
    Windows NT: The handle must have PROCESS_TERMINATE access. For more information, see Process Objects.

    uExitCode

    Specifies the exit code for the process and for all threads terminated as a result of this call. Use the GetExitCodeProcess function to retrieve the process's exit value. Use the GetExitCodeThread function to retrieve a thread's exit value.

    Return Values

    If the function succeeds, the return value is nonzero.
    If the function fails, the return value is zero. To get extended error information, call GetLastError.