I made one windows service and i can control the OnStart, OnStop.
example
protected overwrite void OnStop()
{
//DO something
}
my real question is, how to make an own method in windows service and how do i send a string to it.. i would like it like this
public string getPass(string tempUser)
{
string tempPass = "";
//do something do something,
return tempPass;
}
anyone who knows where i can read about this stuff please contact me..

How to make a method in a windows service.
ChrisLyon
S.Sriram
If so you can use remoting or use a socket to communicate with it for example.
If its internal you can use it like you would anywhere else.
Ariel Valentin
nycole
protected overwrite void OnStop()
{
string pass = getPass( "user1" );
Console.WriteLine( pass );
}
But if you want to call this method from outside this service with an other application you must use Sockets or Remoting. Take a look at some of these articles, this should cover you question:
Miles Calunod
For example, you create an Server Socket that will acception connection requests. When it recieves a specific message it will send the Pass back to the connected socket.