Server Help Forum Index Server Help
Community forums for Subgame, ASSS, and bots
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   StatisticsStatistics   RegisterRegister 
 ProfileProfile   Login to check your private messagesLogin to check your private messages   LoginLogin (SSL) 

Server Help | ASSS Wiki (0) | Shanky.com
Writing a Windows Service

 
Post new topic   Reply to topic Printable version
 View previous topic  First C++ project [Uh-oh] Post :: Post PHP-based File Browser  View next topic  
Author Message
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Wed Mar 22, 2006 1:43 am    Post subject: Writing a Windows Service Reply to topic Reply with quote

Any of you guys know of a good tutorial that shows the steps to write a windows (nt) service? Ive tried using the project types from VS.net (2003) but theyre either incomplete, trying to hold my hand too much, or in a language Id rather not use/dont know (VB.net/C#). The (lack of) information on MSDN isnt helping much either.

Anyway, Im trying to find some info for writing a service from scratch, preferably in C++, but if it comes down to it I will learn/use whatever necessary to do so.

Thanks
-C
_________________
There are 7 user(s) ignoring me right now.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Mar 22, 2006 10:35 am    Post subject: Reply to topic Reply with quote

Service Programs. Not exactly a tutorial, but straight from the horse's mouth.
_________________
This help is informational only. No representation is made or warranty given as to its content. User assumes all risk of use. Cyan~Fire assumes no responsibility for any loss or delay resulting from such use.
Wise men STILL seek Him.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Wed Mar 22, 2006 2:03 pm    Post subject: Reply to topic Reply with quote

Yeah, I saw that, and its not very straight forward as to what goes where and whats required, etc, atleast, not from what my newbie ass could tell. Ive never written a service before so Id like something which is more step by step from creating the service, to running it and finally stopping.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Mr Ekted
Movie Geek


Gender:Gender:Male
Joined: Feb 09 2004
Posts: 1379
Offline

PostPosted: Wed Mar 22, 2006 2:30 pm    Post subject: Reply to topic Reply with quote

I've never done it before, but I thought there were utilities that could convert any EXE into a service, or load them dynamically as service.
_________________
4,691 irradiated haggis!
Back to top
View users profile Send private message Add User to Ignore List
Cyan~Fire
I'll count you!
I'll count you!


Age:30
Gender:Gender:Male
Joined: Jul 14 2003
Posts: 4608
Location: A Dream
Offline

PostPosted: Wed Mar 22, 2006 11:08 pm    Post subject: Reply to topic Reply with quote

Well, what I got from skimming that guide is this:

A service has a main() function, like any other console app. In this main function, it calls StartServiceCtrlDispatcher(), which registers each service that the module holds. The system will then call the ServiceMain function for each service it's loading (in a separate thread). Each ServiceMain function should call RegisterServiceCtrlHandlerEx() to provide a function that processes control requests (like pause, stop, etc.), perform initialization, and call SetServiceStatus() with SERVICE_RUNNING.

And that's it. Now, like Ekted, I've never written a service before, so it may not quite work like that, but that's the impression I got from the docs.
Back to top
View users profile Send private message Add User to Ignore List Visit posters website
D1st0rt
Miss Directed Wannabe


Age:30
Gender:Gender:Male
Joined: Aug 31 2003
Posts: 2247
Location: Blacksburg, VA
Offline

PostPosted: Thu Mar 23, 2006 1:39 am    Post subject: Reply to topic Reply with quote

This is what Ekted is referring to

http://forums.minegoboom.com/viewtopic.php?t=5463
_________________

Back to top
View users profile Send private message Add User to Ignore List Visit posters website
Cerium
Server Help Squatter


Age:36
Gender:Gender:Male
Joined: Mar 05 2005
Posts: 807
Location: I will stab you.
Offline

PostPosted: Thu Mar 23, 2006 4:48 am    Post subject: Reply to topic Reply with quote

Yeah, Ive considered using that, since for what Im trying to do that would probably work slightly better anyway.

However, I know eventually it will be useful to know how to write a service, and Im getting sick and tired of these goddamn wizards that are trying to do everything for me.
Back to top
View users profile Send private message Add User to Ignore List AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Server Help Forum Index -> Non-Subspace Related Coding All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum
View online users | View Statistics | View Ignored List


Software by php BB © php BB Group
Server Load: 189 page(s) served in previous 5 minutes.

phpBB Created this page in 0.075943 seconds : 31 queries executed (54.5%): GZIP compression disabled