Re: Stand alone Executable return argument

From: Sunny (Sunny_at_discussions.microsoft.com)
Date: 10/28/04


Date: Thu, 28 Oct 2004 06:29:05 -0700

Hi Nicholas great to see you finally after a long time.
Thanks for the info, infact i am writing out an xml file as my work process
and at the end my app is invoking a third application that signals to my
caller as a signal of my work completion, but this app is being used by a lot
of apps in my dept and there is a req now that it must return a signal value
so that the caller does not always have to go and check something else to
find out if i have finished.
I was thinking there would be a better way to return a status signal to the
callers even in a static void main implementations

public static void main(string[] args)
{
    //All the work
    myInternalClass mc = new myInternalClass(args);
    //Now finished and return something
}

Thanks for all the help, and welcome for more suggestions. ..

With Regards
Sunny

"Nicholas Paldino [.NET/C# MVP]" wrote:

> Sunny,
>
> You really aren't going to be able to pass a value back through the
> executable. The best you could do is pass an integer back to the process
> that triggered you.
>
> If possible, you should refactor this code out into a component, and
> integrate that component into the other applications that need it. It would
> be easy enough to expose this as a .NET and a COM component, which should
> allow you to access it from almost anywhere.
>
> If you need to keep this as an executable, then you might want to
> consider having it write out files to another directory, which you can
> relate to the original files, which have the MD5 hash in them, or store the
> hashes in some other persistant format (like a database) where the other
> applications can get to it.
>
> Hope this helps.
>
>
> --
> - Nicholas Paldino [.NET/C# MVP]
> - mvp@spam.guard.caspershouse.com
>
> "Sunny" <Sunny@discussions.microsoft.com> wrote in message
> news:61F243CF-E0DD-4DE5-BAB3-E8DC70D3A03F@microsoft.com...
> > Hi,
> > I have a very serious issue at hand. I have created a small C# Console App
> > (Csd.exe) that collects a list of files as its argument and generates
> > their
> > Md5 sets.
> > This application is used by other applications in my dept, which simply
> > call
> > this Csd.exe app and passing a list of files.
> > I want to ask how can I return a value from this Csd.exe application as an
> > indicator or a signal to the calling app that Csd.exe has finished
> > working.
> > The problem is that the main component of my Csd.exe is a
> >
> > public static void main(string[] args)
> > {
> > //All the work
> > //And that is it (done)!
> > //Here i want to enter a return int or a bool (true) so that the caller
> > can know
> > //that i am finished processing....
> > }
> >
> > The Static void main does not let me return anything. How can i do that.
> >
> > Please HELP!
> >
> > Thanks and Regards
> > Sunny
> >
>
>
>



Relevant Pages

  • Re: Stand alone Executable return argument
    ... invoking a third application that in turns signals to my caller ... However this app is being used almost by ... > integrate that component into the other applications that need it. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Stand alone Executable return argument
    ... I am in fact writing out a set of Xml files at> this time as my work process and at the end of the process i am infact> invoking a third application that in turns signals to my> caller ... However this app is being used almost> by ... >> If possible, you should refactor this code out into a component, and>> integrate that component into the other applications that need it. ...
    (microsoft.public.dotnet.languages.csharp)
  • RE: More on Shatter
    ... Latency for the WM_TIMER message is irrelevant. ... load, and you code an app to fire WM_TIMER's at every 50ms, your WM_TIMERS ... > try to do real-time things (as I wager most applications ...
    (Vuln-Dev)
  • Re: Safely SHUTDOWN Device from Application
    ... If you have only specific applications then you could designate one to be ... How you handle suspend is very much hardware dependent, ... It's then up to the app to take ... By 'Safe Shutdown', I meant that any application writing/reading to/ ...
    (microsoft.public.windowsce.platbuilder)
  • Re: Help with mini mac program instalation.
    ... not directing my comments to you but rather him. ... you can/must/do setup or configure an app in the process installing it. ... Get the app to APPLICATIONS. ... Once you execute it the first time you can configure the app...but the 'install' is a 'do-little' but get the app/folder w/app to APPLICATIONS. ...
    (comp.sys.mac.advocacy)