Re: Stand alone Executable return argument
From: Sunny (Sunny_at_discussions.microsoft.com)
Date: 10/28/04
- Next message: Yan Vinogradov: "Re: Question on converting char* into System.String"
- Previous message: Johann Blake: "How to decode a JPEG 2000 file or use any internal decoding of WebResponse"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Messages sorted by: [ date ] [ thread ]
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
> >
>
>
>
- Next message: Yan Vinogradov: "Re: Question on converting char* into System.String"
- Previous message: Johann Blake: "How to decode a JPEG 2000 file or use any internal decoding of WebResponse"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Next in thread: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Reply: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|