A
Antares
hi all,
is there in VS.NET a function allow to restart the
computer (similar at ExitWindowsEx API function)?
regards
is there in VS.NET a function allow to restart the
computer (similar at ExitWindowsEx API function)?
regards
-----Original Message-----
Yes,
[DLLImport("AdvAPI32.DLL")]
public static extern Boolean InitiateSystemShutdownEx(
String lpMachineName,
String lpMessage,
Int32 dwTimeout,
Boolean bForceAppsCloesd,
Boolean bRebootAfterShutdown,
UInt32 dwReason);
then call it like InitiateSystemShutdownEx(mahineName, messagetosendtouser,
timeout, BooltoForceAppsClosed, boolToReboot,
IntValueOrEnumerationForReason)
Hope this helps.
Cheers,
Bill
Antares said:hi all,
is there in VS.NET a function allow to restart the
computer (similar at ExitWindowsEx API function)?
regards
.
Antares said:it works,
thanks.
-----Original Message-----
Yes,
[DLLImport("AdvAPI32.DLL")]
public static extern Boolean InitiateSystemShutdownEx(
String lpMachineName,
String lpMessage,
Int32 dwTimeout,
Boolean bForceAppsCloesd,
Boolean bRebootAfterShutdown,
UInt32 dwReason);
then call it like InitiateSystemShutdownEx(mahineName, messagetosendtouser,
timeout, BooltoForceAppsClosed, boolToReboot,
IntValueOrEnumerationForReason)
Hope this helps.
Cheers,
Bill
Antares said:hi all,
is there in VS.NET a function allow to restart the
computer (similar at ExitWindowsEx API function)?
regards
.