Главная страница
    Top.Mail.Ru    Яндекс.Метрика
Форум: "Система";
Текущий архив: 2002.10.03;
Скачать: [xml.tar.bz2];

Вниз

Перезапуск сервиса   Найти похожие ветки 

 
Ученик   (2002-07-24 10:42) [0]

Может ли сервис перезапустить самого себя, если может, то каким образом ?


 
IlyaA   (2002-07-24 14:16) [1]

Попробуй через API функции StartService, CreateService, StopService


 
Ученик   (2002-07-24 15:55) [2]

Проблема в том, что все заканчивается на остановке сервиса (он завершает работу), пока перегружаю через выполнение временного cmd-файла (net stop ..., net start ...), но net.exe может и не быть.


 
ZZ   (2002-07-24 16:01) [3]

А ты не можешь написать в сервисе функцию, какбы перезапускающую сервис ?


 
Ученик   (2002-07-24 16:08) [4]

Какие-то заморочки на уровне системы, после входа пользователя в систему, сервис создает иконку в Tray, но показываемые окна какие странные - местами недорисованные, лечится полной перезагрузкой сервиса.


 
Proton   (2002-07-24 16:24) [5]

q.bat
net start "servicename"
net stop "servicename"
q.bat
winexec("q.bat",sw_hide);


 
Ученик   (2002-07-24 16:41) [6]

>Proton
Спасибо, но это уже было.


 
Proton   (2002-07-24 18:36) [7]

ooups извените


 
IlyaA   (2002-07-25 07:58) [8]

Т.к. с утилите управления сервисами есть пункт "перезапустить сервис", то я подозреваю что должна быть такая ф-я


 
Ученик   (2002-07-25 10:33) [9]

>IlyaA
Судя по происходящему там выполняется Остановить сервис, Запустить сервис


 
IlyaA   (2002-07-25 14:24) [10]

Почитай. Может поможет. Из MSDN


Platform SDK: Server Data Objects
ISdoServiceControl::ResetService
[This is preliminary documentation and subject to change.]

[This technology will work only on Windows 2000 and Whistler. Future versions of Windows will support an alternate API.]

The ISdoServiceControl::ResetService method resets the service that is administered by the SDO API. Resetting the service causes the service to refresh its data.

HRESULT ResetService (void);
Parameters
None.

Return Values
If the method succeeds the return value is S_OK.

If the method fails, the return value is one of the following error codes.

Value Meaning
E_ABORT The operation was aborted.
E_FAIL An unspecified error occurred.
E_INVALIDARG One of the parameters is invalid.
E_NOINTERFACE A specified interface is not supported.
E_NOTIMPL A specified method is not implemented.
E_OUTOFMEMORY The method was unable to allocate required memory.
E_POINTER A pointer passed as a parameter is not valid.
E_UNEXPECTED The method failed for unknown reasons.


Remarks
The data refresh can take up to five seconds to complete.

Requirements
Windows NT/2000 or later: Requires Windows 2000 or later.
Windows 95/98/Me: Unsupported.
Header: SdoIas.idl.
Library: Included as a resource in IasSdo.dll.

See Also
ISdoMachineGetServiceSDO, ISdoServiceControl

Platform SDK Release: February 2001 Contact Platform SDK Order a Platform SDK CD Online



Requirements
Windows NT/2000 or later: Requires Windows 2000 or later.
Windows 95/98/Me: Unsupported.
Header: SdoIas.idl.
Library: Included as a resource in IasSdo.dll.
See Also
ISdoMachineGetServiceSDO, ISdoServiceControl


 
IlyaA   (2002-07-25 14:26) [11]

Вот ещё немного. Почитай.


Platform SDK: Server Data Objects
ISdoServiceControl
[This is preliminary documentation and subject to change.]

[This technology will work only on Windows 2000 and Whistler. Future versions of Windows will support an alternate API.]

Use the ISdoServiceControl interface to control the service being administered on the SDO computer.

Methods and Properties in Vtable Order
IUnknown Methods

IDispatch Methods

ISdoServiceControl Methods Description
StartService Starts the service.
StopService Stops the service.
GetServiceStatus Retrieves the current status of the service.
ResetService Resets the service.


Remarks
Use the ISdoMachine::GetServiceSDO method to retrieve a pointer to an ISdoServiceControl interface.

Requirements
Windows NT/2000 or later: Requires Windows 2000 or later.
Windows 95/98/Me: Unsupported.
Header: SdoIas.idl.
Library: Included as a resource in IasSdo.dll.

See Also
Server Data Objects Reference, Server Data Objects Interfaces

Platform SDK Release: February 2001 Contact Platform SDK Order a Platform SDK CD Online



Requirements
Windows NT/2000 or later: Requires Windows 2000 or later.
Windows 95/98/Me: Unsupported.
Header: SdoIas.idl.
Library: Included as a resource in IasSdo.dll.
See Also
Server Data Objects Reference, Server Data Objects Interfaces



Страницы: 1 вся ветка

Форум: "Система";
Текущий архив: 2002.10.03;
Скачать: [xml.tar.bz2];

Наверх





Память: 0.48 MB
Время: 0.007 c
1-7985
s.ts
2002-09-20 21:21
2002.10.03
Узнать запущена ли IDE


1-7945
Filat
2002-09-23 18:52
2002.10.03
СРОЧНО!!!! Сколько было SP для Delphi 5 !!!!


3-7852
Guardian
2002-09-11 13:50
2002.10.03
Не передаются параметры в функцию dbiAddIndex


1-7952
Svin
2002-09-23 14:56
2002.10.03
Рекурсия


4-8214
Soft
2002-08-16 14:04
2002.10.03
Завершился ли Thread или нет?





Afrikaans Albanian Arabic Armenian Azerbaijani Basque Belarusian Bulgarian Catalan Chinese (Simplified) Chinese (Traditional) Croatian Czech Danish Dutch English Estonian Filipino Finnish French
Galician Georgian German Greek Haitian Creole Hebrew Hindi Hungarian Icelandic Indonesian Irish Italian Japanese Korean Latvian Lithuanian Macedonian Malay Maltese Norwegian
Persian Polish Portuguese Romanian Russian Serbian Slovak Slovenian Spanish Swahili Swedish Thai Turkish Ukrainian Urdu Vietnamese Welsh Yiddish Bengali Bosnian
Cebuano Esperanto Gujarati Hausa Hmong Igbo Javanese Kannada Khmer Lao Latin Maori Marathi Mongolian Nepali Punjabi Somali Tamil Telugu Yoruba
Zulu
Английский Французский Немецкий Итальянский Португальский Русский Испанский