|
Subject:
|
Shutdown using VB.NET
|
|
Posted By:
|
ashoka_klt
|
Post Date:
|
9/20/2006 7:01:06 AM
|
hi,
How to shutdown a system using .NET code. In VB6 we were using ExitWindowsEx() API function to shut down the system. In VB.NET. What code should be included to shutdown,logoff or restart a system, Thank you, By, Ashok Kumar. K
|
|
Reply By:
|
dparsons
|
Reply Date:
|
9/20/2006 7:37:04 AM
|
You need to import 3 dlls:
user32.DLL, advapi32.DLL, and kernel32.DLL
the MSDN has a good article on the appropriate way to import these dlls to call those various functions.
--Stole this from a moderator
I will only tell you how to do it, not do it for you. Unless, of course, you want to hire me to do work for you.
|
|
Reply By:
|
BrianWren
|
Reply Date:
|
9/20/2006 3:57:07 PM
|
Could you give a link (or more) to the MSDN article? (Or the title if it is in the MSDN that loads with .NET?)
|
|
Reply By:
|
ashoka_klt
|
Reply Date:
|
9/21/2006 1:38:30 AM
|
thanks dparsons, Its worthful for me...
|
|
Reply By:
|
dparsons
|
Reply Date:
|
9/21/2006 10:36:17 AM
|
sure:
http://blogs.msdn.com/brad_mccabe/archive/2005/03/02/383542.aspx
--Stole this from a moderator
I will only tell you how to do it, not do it for you. Unless, of course, you want to hire me to do work for you.
|