|
HINSTANCE i = ShellExecute(Handle, "open", "PROGRAM", 0, 0, SW_SHOWNORMAL);
if((int)i < 33)
ShowMessage("PROGRAM을 실행할 수 없습니다.");
여기서 i 값을 보면 결과를 알 수 있습니다.
0 The operating system is out of memory or resources.
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
ERROR_BAD_FORMAT The .exe file is invalid (non-Win32® .exe or error in .exe image).
SE_ERR_ACCESSDENIED The operating system denied access to the specified file.
SE_ERR_ASSOCINCOMPLETE The file name association is incomplete or invalid.
SE_ERR_DDEBUSY The DDE transaction could not be completed because other DDE transactions were being processed.
SE_ERR_DDEFAIL The DDE transaction failed.
SE_ERR_DDETIMEOUT The DDE transaction could not be completed because the request timed out.
SE_ERR_DLLNOTFOUND The specified dynamic-link library was not found.
SE_ERR_FNF The specified file was not found.
SE_ERR_NOASSOC There is no application associated with the given file name extension.
SE_ERR_OOM There was not enough memory to complete the operation.
SE_ERR_PNF The specified path was not found.
SE_ERR_SHARE A sharing violation occurred.
스머프 님이 쓰신 글 :
: 안녕하세요..
:
: 궁금한 점이 있어서 질문드립니다.
:
:
: ShellExecute( Application.Handle, 'open', 'exam',pPath, 'C:\', W_SHOWNORMAL );
:
: 라인으로 exam.exe 라는 외부 프로그램을 실행시키는데
:
: 이 프로그램(exam.exe)이 실행을 성공적으로 마치면 리턴값이 '0' 이 날라오고
:
: 중간에 오류가 나면 다른 숫자가 날라옵니다..
:
: 이 리턴값을 알 수 있는 방법이 없나요..??
:
: 답변좀 부탁드리겠습니다....
:
:
:
:
|