powered by simpleCommunicator - 2.0.61     © 2026 Programmizd 02
Целевая тема:
Создать новую тему:
Автор:
Закрыть
Цитировать
Форумы / C++ [игнор отключен] [закрыт для гостей] / Shutdown Comp
12 сообщений из 12, страница 1 из 1
Shutdown Comp
    #34353009
Каой функой можно насмерть заресетить комп?? Тоесть не систему, а чтоб сразу перезагрузился или зашатдаунился... Если на ассемблере, то выложите на ассемблере... Заранее спасибо, лучше если ответите на аську 477727949
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353293
Тут пришла идеЯ, может быть стоит вырубиить программно сисвинчестер?
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353416
Фотография mayton
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
Чего-уж мелочится! Предлагаю вам потратить n-ное количество убитых енотов на приобретение Remote Power Switch IP .

(это не реклама!)
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353477
Гугл, нна...
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Гость
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353520
ErV
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
ExitWindowsEx

Это если у ОС из семейства виндовых,
и если у вызывающего процесса нужные привилегии имеются...
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353545
Увы, но вышеприведённый ЕхитВидусЕх ребуть винду - а не компьютер - а мне надо прямо завершить комп, тоесть сделать действие - аналогичное нажатию кнопки reset на сисблоке!
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353592
ErV
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
eNd_ТольяттиУвы, но вышеприведённый ЕхитВидусЕх ребуть винду - а не компьютер - а мне надо прямо завершить комп, тоесть сделать действие - аналогичное нажатию кнопки reset на сисблоке!
Он вырубает винду, если задать POWER_OFF и т.д. И не сразу.
Касательно ресета рой инфу по работе в системе на низком уровне на асме.
В досе было такое прерывание, по более поздним ОСам ищи гуглом...

(ИМХО) Сомневаюсь, что разработчики винды намеренно оставили бы там такую функцию, которая может позволить повредить данные системы...
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353689
Не гугл, не яндекс не помогли... Может вы чем то поможете?
...
Рейтинг: 0 / 0
Shutdown Comp
    #34353705
Фотография Изопропил
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
ACPI попробуй поискать.

Может и готовое решение устроит - http://www.rtsecurity.com/rus/ - RSHUT Pro
...
Рейтинг: 0 / 0
Shutdown Comp
    #34354061
eNd_ТольяттиКаой функой можно насмерть заресетить комп?? Тоесть не систему, а чтоб сразу перезагрузился или зашатдаунился... Если на ассемблере, то выложите на ассемблере... Заранее спасибо, лучше если ответите на аську 477727949
MSDN
System Shutdown Functions
The following functions are used with system shutdown.

Function Description
AbortSystemShutdownStops a system shutdown started by using the InitiateSystemShutdown function. ExitWindowsLogs off the current user. ExitWindowsExEither logs off the current user or shuts down the system or shuts down and restarts the system. InitiateSystemShutdownInitiates a shutdown and optional restart of the specified computer. InitiateSystemShutdownEx Initiates a shutdown and optional restart of the specified computer. LockWorkStation Locks the workstation's display - protecting it from unauthorized use.
...
Рейтинг: 0 / 0
Shutdown Comp
    #34354079
MSDN
InitiateSystemShutdownEx
The InitiateSystemShutdownEx function initiates a shutdown and optional restart of the specified computer.

BOOL InitiateSystemShutdownEx(
LPTSTR lpMachineName, // computer name
LPTSTR lpMessage, // message to display
DWORD dwTimeout, // length of time to display
BOOL bForceAppsClosed, // force closed option
BOOL bRebootAfterShutdown, // reboot option
DWORD dwReason // shutdown reason
);
Parameters
lpMachineName
[in] Pointer to the null-terminated string that specifies the network name of the computer to shut down. If lpMachineName is NULL or an empty string, the function shuts down the local computer.
lpMessage
[in] Pointer to a null-terminated string that specifies a message to display in the shutdown dialog box. This parameter can be NULL if no message is required.
dwTimeout
[in] Specifies the time (in seconds) that the shutdown dialog box should be displayed. While this dialog box is displayed, shutdown can be stopped by the AbortSystemShutdown function.
If dwTimeout is not zero, InitiateSystemShutdownEx displays a dialog box on the specified computer. The dialog box displays the name of the user who called the function, displays the message specified by the lpMessage parameter, and prompts the user to log off. The dialog box beeps when it is created and remains on top of other windows in the system. The dialog box can be moved but not closed. A timer counts down the remaining time before a forced shutdown. If the user logs off, the system shuts down immediately. Otherwise, the computer is shut down when the timer expires.

If dwTimeout is zero, the computer shuts down without displaying the dialog box, and the shutdown cannot be stopped by AbortSystemShutdown.

bForceAppsClosed
[in] Specifies whether applications with unsaved changes are to be forcibly closed. If this parameter is TRUE, such applications are closed. If this parameter is FALSE, a dialog box is displayed prompting the user to close the applications.
bRebootAfterShutdown
[in] Specifies whether the computer is to restart immediately after shutting down. If this parameter is TRUE, the computer is to restart. If this parameter is FALSE, the system flushes all caches to disk, clears the screen, and displays a message indicating that it is safe to power down.
dwReason
[in] Specifies the reason for initiating the shutdown. This reason is recorded in the event log with event number 6006.
Return Values
If the function succeeds, the return value is nonzero.

If the function fails, the return value is zero. To get extended error information, call GetLastError.

Remarks
To shut down the local computer, the calling process must have the SE_SHUTDOWN_NAME privilege. To shut down a remote computer, the calling process must have the SE_REMOTE_SHUTDOWN_NAME privilege on the remote computer. By default, users can enable the SE_SHUTDOWN_NAME privilege on the computer they are logged onto, and administrators can enable the SE_REMOTE_SHUTDOWN_NAME privilege on remote computers.

Common reasons for failure include an invalid or inaccessible computer name or insufficient privilege. The error ERROR_SHUTDOWN_IN_PROGRESS is returned if a shutdown is already in progress on the specified computer.

Requirements
Windows NT/2000: Requires Windows 2000.
Windows 95/98: Unsupported.
Header: Declared in Winreg.h; include Windows.h.
Library: Use Advapi32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows 2000.
...
Рейтинг: 0 / 0
Shutdown Comp
    #34354249
Фотография MasterZiv
Скрыть профиль Поместить в игнор-лист Сообщения автора в теме
Участник
eNd_Тольятти пишет:

> Увы, но вышеприведённый ЕхитВидусЕх ребуть винду - а не компьютер - а
> мне надо прямо завершить комп, тоесть сделать действие - аналогичное
> нажатию кнопки reset на сисблоке!

Предлагаю так:

::MessageBox(NULL,
"Please press \"Reset\" button on your CPU block now if you have such button.",
"Albanian virus request", MB_OK | MB_DEEPESTREQUEST );
Posted via ActualForum NNTP Server 1.4
...
Рейтинг: 0 / 0
12 сообщений из 12, страница 1 из 1
Форумы / C++ [игнор отключен] [закрыт для гостей] / Shutdown Comp
Найденые пользователи ...
Разблокировать пользователей ...
Читали форум (0):
Пользователи онлайн (0):
x
x
Закрыть


Просмотр
0 / 0
Close
Debug Console [Select Text]