Re: Stand alone Executable return argument
From: Sunny (Sunny_at_discussions.microsoft.com)
Date: 10/28/04
- Next message: Ignacio Machin \( .NET/ C# MVP \): "Re: Format real to byte [], NOT string"
- Previous message: Bob Grommes: "Re: Stand alone Executable return argument"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Next in thread: Bob Grommes: "Re: Stand alone Executable return argument"
- Messages sorted by: [ date ] [ thread ]
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
> >
>
>
>
- Next message: Ignacio Machin \( .NET/ C# MVP \): "Re: Format real to byte [], NOT string"
- Previous message: Bob Grommes: "Re: Stand alone Executable return argument"
- In reply to: Nicholas Paldino [.NET/C# MVP]: "Re: Stand alone Executable return argument"
- Next in thread: Bob Grommes: "Re: Stand alone Executable return argument"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|