Re: Stand alone Executable return argument

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


Date: Thu, 28 Oct 2004 06:23:02 -0700

I appreciate all the help, 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 (indirectly) signals to my caller
as a signal of my work completion. However this app is being used almost by
all the other apps and i have been told to return a signal to the caller that
i have finished my work in addition to the files written out, since they
don't always want to go and read the files as such.

But I think there has got to be a way for the. static void main(string[]
args) to return some signal values to their callers, this simply defies all
logic that this is not prossible in this scenario...
would look forward to any more suggestions. . .

Thanks for the Help,

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
    ... 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: Stand alone Executable return argument
    ... 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 ... > 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: Themes & Colors
    ... The whole idea of Windows is to provide a consistent color ... If you change the color scheme, you change ALL applications. ... If you want to change the way your app looks color-wise, ...
    (microsoft.public.fox.programmer.exchange)