информационная безопасность
без паники и всерьез
 подробно о проектеRambler's Top100
Сетевые кракеры и правда о деле ЛевинаСтрашный баг в WindowsЗа кого нас держат?
BugTraq.Ru
Русский BugTraq
 Анализ криптографических сетевых... 
 Модель надежности двухузлового... 
 Специальные марковские модели надежности... 
 Бэкдор в xz/liblzma, предназначенный... 
 Три миллиона электронных замков... 
 Doom на газонокосилках 
главная обзор RSN блог библиотека закон бред форум dnet о проекте
bugtraq.ru / форум / programming
Имя Пароль
ФОРУМ
если вы видите этот текст, отключите в настройках форума использование JavaScript
регистрация





Легенда:
  новое сообщение
  закрытая нитка
  новое сообщение
  в закрытой нитке
  старое сообщение
  • Напоминаю, что масса вопросов по функционированию форума снимается после прочтения его описания.
  • Новичкам также крайне полезно ознакомиться с данным документом.
[Win32] Не прописать, а написать 11.05.01 17:53  Число просмотров: 719
Автор: SerpentFly Статус: Незарегистрированный пользователь
<"чистая" ссылка>
Вообще-то ее придется переписать в соответствии с требованиями предьявляемыми к сервисам. Немного я вставил сюда (надеюсь с английским проблемы нет), а вообще читай MSDN.

When designing a service executable, you must concern yourself with three kinds of functions:


Process's entry-point function This function is your standard (w)main or (w)WinMain function with which you should be extremely familiar by now. For a service, this function initializes the process as a whole and then calls a special function that connects the process with the local system's SCM. At this point, the SCM takes control of your primary thread for its own purposes. Your code will regain control only when all of the services in the executable have stopped running.


Service's ServiceMain function You must implement a ServiceMain function for each service contained inside your executable file. To run a service, the SCM spawns a thread in your process that executes your ServiceMain function. When the thread returns from ServiceMain, the SCM considers the service stopped. Note that this function does not have to be called ServiceMain; you can give it any name you desire.


Service's HandlerEx function Each service must have a HandlerEx function associated with it. The SCM communicates with the service by calling the service's HandlerEx function. The code in the HandlerEx function is executed by your process's primary thread. The HandlerEx function either executes the necessary action, or it must communicate the SCM's instructions to the thread that is executing the service's ServiceMain function by using some form of interthread communication. Note that each service can have its own HandlerEx function, or multiple services (in a single executable) can share a single HandlerEx function. One of the parameters passed to the HandlerEx function indicates which service the SCM wishes to communicate with. Note that this function does not have to be called HandlerEx; you can give it any name you desire.
<programming>
[Win32] Люди как программу сервисом в win2000 прописать? (empty) 11.05.01 12:18  
Автор: Pastor Статус: Незарегистрированный пользователь
<"чистая" ссылка>
[Win32] Не прописать, а написать 11.05.01 17:53  
Автор: SerpentFly Статус: Незарегистрированный пользователь
<"чистая" ссылка>
Вообще-то ее придется переписать в соответствии с требованиями предьявляемыми к сервисам. Немного я вставил сюда (надеюсь с английским проблемы нет), а вообще читай MSDN.

When designing a service executable, you must concern yourself with three kinds of functions:


Process's entry-point function This function is your standard (w)main or (w)WinMain function with which you should be extremely familiar by now. For a service, this function initializes the process as a whole and then calls a special function that connects the process with the local system's SCM. At this point, the SCM takes control of your primary thread for its own purposes. Your code will regain control only when all of the services in the executable have stopped running.


Service's ServiceMain function You must implement a ServiceMain function for each service contained inside your executable file. To run a service, the SCM spawns a thread in your process that executes your ServiceMain function. When the thread returns from ServiceMain, the SCM considers the service stopped. Note that this function does not have to be called ServiceMain; you can give it any name you desire.


Service's HandlerEx function Each service must have a HandlerEx function associated with it. The SCM communicates with the service by calling the service's HandlerEx function. The code in the HandlerEx function is executed by your process's primary thread. The HandlerEx function either executes the necessary action, or it must communicate the SCM's instructions to the thread that is executing the service's ServiceMain function by using some form of interthread communication. Note that each service can have its own HandlerEx function, or multiple services (in a single executable) can share a single HandlerEx function. One of the parameters passed to the HandlerEx function indicates which service the SCM wishes to communicate with. Note that this function does not have to be called HandlerEx; you can give it any name you desire.
1




Rambler's Top100
Рейтинг@Mail.ru


  Copyright © 2001-2024 Dmitry Leonov   Page build time: 0 s   Design: Vadim Derkach