Click here to Skip to main content
15,920,956 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CPropertySheet change Cancel Button Pin
moobob3-May-02 9:39
moobob3-May-02 9:39 
GeneralRe: CPropertySheet change Cancel Button Pin
Tim Smith3-May-02 9:55
Tim Smith3-May-02 9:55 
QuestionHow does net start service_name.exe call the service? Pin
Craig Miller3-May-02 8:50
Craig Miller3-May-02 8:50 
AnswerRe: How does net start service_name.exe call the service? Pin
Tim Smith3-May-02 9:03
Tim Smith3-May-02 9:03 
GeneralRe: How does net start service_name.exe call the service? Pin
Craig Miller3-May-02 9:42
Craig Miller3-May-02 9:42 
GeneralRe: How does net start service_name.exe call the service? Pin
Tim Smith3-May-02 9:59
Tim Smith3-May-02 9:59 
GeneralRe: How does net start service_name.exe call the service? Pin
Craig Miller3-May-02 10:13
Craig Miller3-May-02 10:13 
GeneralRe: How does net start service_name.exe call the service? Pin
Tim Smith3-May-02 10:36
Tim Smith3-May-02 10:36 
You shouldn't have to do anything special. Just take a look at your service creation code (look for the CreateService API routine). Instead of just specifying the program name for the 8th argument, append " -service1" to the end of that string and then call CreateService. That should get it done.

Now if the service already exists, you will have to invoke OpenService and then ChangeServiceConfig. In my code I just blindly call CreateService. If it returns ERROR_SERVICE_EXISTS or ERROR_DUP_NAME, then I call OpenService and ChangeServiceConfig to change any service settings.

Tim Smith

I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
GeneralRe: How does net start service_name.exe call the service? Pin
Craig Miller3-May-02 11:44
Craig Miller3-May-02 11:44 
GeneralTest my new hash algorithm Pin
Dominik Reichl3-May-02 8:42
Dominik Reichl3-May-02 8:42 
GeneralRe: Test my new hash algorithm Pin
Tim Smith3-May-02 9:08
Tim Smith3-May-02 9:08 
GeneralRe: Test my new hash algorithm Pin
Dominik Reichl3-May-02 9:12
Dominik Reichl3-May-02 9:12 
GeneralRe: Test my new hash algorithm Pin
Tim Smith3-May-02 9:53
Tim Smith3-May-02 9:53 
GeneralStandard Form prob! Pin
Steven Richardson3-May-02 8:42
Steven Richardson3-May-02 8:42 
Generalsorting ctreectrl's items Pin
3-May-02 8:01
suss3-May-02 8:01 
Generalrepost: my math problem Pin
lucy3-May-02 6:51
lucy3-May-02 6:51 
QuestionVStudio setting to see macro expansion? Pin
hiseldl3-May-02 6:10
hiseldl3-May-02 6:10 
AnswerRe: VStudio setting to see macro expansion? Pin
Tom Archer3-May-02 6:36
Tom Archer3-May-02 6:36 
GeneralRe: VStudio setting to see macro expansion? Pin
lucy3-May-02 6:55
lucy3-May-02 6:55 
GeneralRe: VStudio setting to see macro expansion? Pin
Tom Archer3-May-02 7:02
Tom Archer3-May-02 7:02 
GeneralRe: VStudio setting to see macro expansion? Pin
lucy3-May-02 7:11
lucy3-May-02 7:11 
GeneralRe: VStudio setting to see macro expansion? Pin
Tom Archer3-May-02 7:18
Tom Archer3-May-02 7:18 
GeneralRe: VStudio setting to see macro expansion? Pin
lucy3-May-02 7:39
lucy3-May-02 7:39 
GeneralRe: VStudio setting to see macro expansion? Pin
Tom Archer3-May-02 10:08
Tom Archer3-May-02 10:08 
GeneralRe: VStudio setting to see macro expansion? Pin
hiseldl3-May-02 7:30
hiseldl3-May-02 7:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.