I told you this only works if the shutdown was initiated with SHUTDOWN.EXE. If something calls ExitWindowsEx, SHUTDOWN /A will NOT abort it. If it works with your test patch, great, that's one test. I can pretty much guarantee that it won't work in all cases. If your patch uses SHUTDOWN.EXE to restart the machine, you'll be OK. Not great, but OK. There will be those cases where your 1 second delay (or whatever you use) will be sufficient for the patch to call SHUTDOWN.EXE and shutdown actually gets around to calling ExitWindowsEx before your piece of code can launch SHUTDOWN /A.
Thanks for your reply.
Could you please help me convert this Module of VB .NET in to C# ...
Public CustomerList As ArrayList = New ArrayList()
Public ordersMap As Collections.Hashtable = New Hashtable()
' Global variables
Public UserNameVal As String
Public UserSurnameVal As String
Public UserTypeVal As String
Public UserRoomNoVal As String
Public UserNoOfCovers As String
Public UserId As Integer
Public CurrCustomer As Customer
Hi, You can not create Module class in C#.net as it was there in VB6 and now in VB.NET.
It may be because microsoft wanted to be purely Object oriented with C#. Instead you can create a Class Library for common functions and use it.
Quite likely; but I will give the OP the benefit of the doubt and assume that it's a language problem, given his name and location. If he still doesn't understand I will suggest the Chinese forum and see if that helps him / her.
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
Highlighting the text in random parts isn't enough. You need to let us know how far you've got with the code, what exceptions or problems you are having in it. We won't write the whole thing for you - we don't need to pass your class; you do.
I'm not a stalker, I just know things. Oh by the way, you're out of milk.