Results 1 to 3 of 3

Thread: VB6 Executable return code

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    4

    Question VB6 Executable return code

    Is it possible to let a VB executable give a return code. So, if my program runs correctly, the executable returns 0 and if there is an error it returns 1, for example.

    I need this because my VB program is a batch program that is started from an AVAS (Siemens) scheduler. The scheduler needs to know if the program has run correctly (which it can tell by checking the return code of the program) before it can continue executing the other programs in the batch process.

    Thanks in advance for your help.

  2. #2
    Lively Member
    Join Date
    Oct 1999
    Location
    East Ballina,NSW,Australia
    Posts
    121
    I think it should be possible.

    Specfically, How does the scheduler check the return value, what langauge is the scheduler made in?

    It'll come down to the scheduler, from my knowledge I think VB can't simply just return a value. There may be some way i dont know of.

    But once the program has scuessfully loaded you should be able to communicate with another app to say it loaded sucessfully, or write to the registry or whatever other way, for the scheduler to see if it loaded correctly.

    Best Regards,

    Smithy.

  3. #3

    Thread Starter
    New Member
    Join Date
    Jun 2002
    Posts
    4
    Thanks for the reply.

    I think the scheduler runs on some kind of UNIX version. It runs on our mainframe. The scheduler (AVAS) on our mainframe starts a process (my VB executable) on a Windows client.

    My vb app simply needs to return a value (0 for succes, 1 for failure). But, as you said, it can also be done by, for example, writing a dummy file to a directory on succes, which the scheduler can check for. I just think it's better to let the executable return a code. I know it can be done in C (I think JAVA can do it also), but I just don't know if it can be done in VB.

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