diff options
author | Andreas Baumann <abaumann@yahoo.com> | 2009-03-26 17:26:00 +0100 |
---|---|---|
committer | Andreas Baumann <abaumann@yahoo.com> | 2009-03-26 17:26:00 +0100 |
commit | a92ee231c47556681311ae27fdfdb5e36d3e2582 (patch) | |
tree | 31c067d164b43d5c641aeaffd731473cf34777df /include | |
parent | cbc6aaca6dd7ac57a6115b3512a85045e51303dd (diff) | |
download | wolfbones-a92ee231c47556681311ae27fdfdb5e36d3e2582.tar.gz wolfbones-a92ee231c47556681311ae27fdfdb5e36d3e2582.tar.bz2 |
code moved, works again somehow, now cleanup in the service
Diffstat (limited to 'include')
-rw-r--r-- | include/wolf/log/messages.h | 8 | ||||
-rw-r--r-- | include/wolf/service/service.h | 14 |
2 files changed, 22 insertions, 0 deletions
diff --git a/include/wolf/log/messages.h b/include/wolf/log/messages.h index 366f5c0..eea86fa 100644 --- a/include/wolf/log/messages.h +++ b/include/wolf/log/messages.h @@ -177,6 +177,14 @@ #define WOLF_MSG_SERVICE_CANT_OPEN_SERVICE WOLF_MSG_SERVICE_BASE+8 #define WOLF_MSG_SERVICE_CANT_DELETE_SERVICE WOLF_MSG_SERVICE_BASE+9 #define WOLF_MSG_SERVICE_SERVICE_UNINSTALLED WOLF_MSG_SERVICE_BASE+10 +#define WOLF_MSG_SERVICE_REPORT_STATUS WOLF_MSG_SERVICE_BASE+11 +#define WOLF_MSG_SERVICE_CANT_REPORT_STATUS WOLF_MSG_SERVICE_BASE+12 +#define WOLF_MSG_SERVICE_HANDLING_EVENT WOLF_MSG_SERVICE_BASE+13 +#define WOLF_MSG_SERVICE_CANT_REGISTER_SERVICE_CTRL_HANDLER WOLF_MSG_SERVICE_BASE+14 +#define WOLF_MSG_SERVICE_CANT_CREATE_STOP_EVENT WOLF_MSG_SERVICE_BASE+15 +#define WOLF_MSG_SERVICE_STARTED_SERVICE WOLF_MSG_SERVICE_BASE+16 +#define WOLF_MSG_SERVICE_WAIT_FOR_OBJECT_FAILED WOLF_MSG_SERVICE_BASE+17 +#define WOLF_MSG_SERVICE_STOPPED_SERVICE WOLF_MSG_SERVICE_BASE+18 #ifdef __cplusplus extern "C" { diff --git a/include/wolf/service/service.h b/include/wolf/service/service.h index 1d62474..f75b6af 100644 --- a/include/wolf/service/service.h +++ b/include/wolf/service/service.h @@ -43,6 +43,10 @@ extern "C" { #endif +extern SERVICE_STATUS_HANDLE service_status_handle; +extern SERVICE_STATUS service_status; +extern HANDLE service_stop_event; + /** * @brief structure to fill out when creating a Windows service. */ @@ -79,6 +83,16 @@ typedef enum wolf_service_event_t { */ wolf_service_event_t wolf_service_events_suspend( int timeout, wolf_error_t *error ); +/** + * The main service function. + * + * @param argc number of arguments as in main() + * @param argv arguments as in main() + * + * Note: Must be exported as it gets called from the SCM in a service thread/process. + */ +void WINAPI wolf_service_main( DWORD argc, LPTSTR *argv ); + #ifdef __cplusplus } #endif |