Open program error notification

This is a discussion on Open program error notification within the C++ Programming forums, part of the General Programming Boards category; Hi, I've almost finished a Terminal/Command Prompt Program that can do most of the things a Microsoft or Linux Terminal ...

  1. #1
    Registered User
    Join Date
    Mar 2013
    Location
    England
    Posts
    9

    Open program error notification

    Hi,
    I've almost finished a Terminal/Command Prompt Program that can do most of the
    things a Microsoft or Linux Terminal can do - but I have a problem. I've got it to open
    programs fine, and I can also open their browser to the download page if they don't have it,
    but I need my program to know if there isn't the software so a bit like command prompt where
    it says 'The system cannot find the file test.txt.' and then it'll take them to the website if they like.
    I'd appreciate it if someone gave me advice on what to do.Thank you ,
    Joe

  2. #2
    C++まいる!Cをこわせ! Elysia's Avatar
    Join Date
    Oct 2007
    Posts
    22,537
    If you use an API that would open a file, it would tell you if it succeeded or not. What API is dependent upon your platform; there is no standard C++ function for this.
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #3
    Algorithm Dissector iMalc's Avatar
    Join Date
    Dec 2005
    Location
    New Zealand
    Posts
    6,299
    Sounds like you should stop using System to launch the program, and use CreateProcess instead, and possibly WaitForInputIdle, not to mention CloseHandle.
    My homepage
    Advice: Take only as directed - If symptoms persist, please see your debugger

    Linus Torvalds: "But it clearly is the only right way. The fact that everybody else does it some other way only means that they are wrong"

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I had a notification
    By Cynic in forum General Discussions
    Replies: 3
    Last Post: 03-28-2012, 01:20 AM
  2. Email notification
    By cjjoy1980 in forum General Discussions
    Replies: 3
    Last Post: 04-10-2010, 01:50 PM
  3. receiving notification when user runs a program
    By hanhao in forum C++ Programming
    Replies: 4
    Last Post: 01-13-2006, 10:23 PM
  4. Error!- Cannot open .rc! READ!!
    By oobootsy1 in forum C++ Programming
    Replies: 3
    Last Post: 07-30-2003, 05:06 AM
  5. notification of new processes
    By bennyandthejets in forum Windows Programming
    Replies: 3
    Last Post: 12-07-2002, 04:09 AM

Tags for this Thread


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21