I have created a console application, and I used the code below to get the respond from the system shutdown.. But it don't seems to be working.. And I owaz get this error
c:\jia en\tcp\client_standalone\client.cs(96,27): error CS0115: 'Client.Client.WndProc(ref System.Windows.Forms.Message)': no suitable method found to override
Please HELP me.. Thankz..protected override void WndProc(ref System.Windows.Forms.Message m)
{
if(m.Msg==WM_QUERYENDSESSION)
isShuttingDown=true;
}
base.WndProc(ref m);
private void Client_Closing(object sender, System.ComponentModel.CancelEventArgs e)
if(isShuttingDown)
e.Cancel=false;
isShuttingDown = false;
string endTime = GetTime();
#region
System.Security.Principal.WindowsPrincipal wp =
System.Security.Principal.WindowsPrincipal
(System.Security.Principal.WindowsIdentity.GetCurrent());
c.machName = wp.Identity.Name;
Console.WriteLine(c.machName);
#endregion
Process[] procs = Process.GetProcesses( Environment.MachineName );
c.procName = process.ProcessName + "\n";
Console.WriteLine(c.procName);
writeToFile();