CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1

    How to trap the return error of system() ?

    I'm writing a DOS program and is using system() to call an exe.
    How do I trap the return error of the system() call?

    Also is there any Sleep() function for a DOS program?

    Thanks.

  2. #2
    Join Date
    Mar 2003
    Posts
    29
    The system functions returns the error code :

    int err = system("dir");

    if this doesnt work, the return code anyhow is usualy stored in AX register right after the 'system' function returns.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured