🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.nativeapi
Article #16208

Re: Troubles with services

#16208
From: user
Date: Mon, 26 May 2003 22:29
15 lines
1941 bytes
Stefano Bonifazi wrote:
> ... from within another application I would like to install my service
> (and then starting it), but not launching it from ShellExecuteEx (or
> similar) with the "/INSTALL" parameter, as I would like to check if it's
> installed successfully! But I didn't find any useful API...
What about CreateService()?

> So I thought to install it that way, and the using the OpenSCManager and
> OpenService functions to check the installation result, but OpenService
> always fails and GetLastError always reports ERROR_SERVICE_DOES_NOT_EXIST
> (by the way what's the difference with ERROR_INVALID_NAME?)
I'm just guessing, but maybe the command line method is installing the 
service without actually starting it? (I think you'd get 
ERROR_INVALID_NAME if you passed a service name that was too long or 
that contained invalid characters, \ or /.)
Technical Details
Message-ID: <3ED2955A.2020303@domain.invalid>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail
References: <3ed1e176@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,2bef8d34fe764e59
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-05-26 16:04:58 PST
Message-ID: <3ED2955A.2020303@domain.invalid>
Date: Mon, 26 May 2003 18:29:46 -0400
From:  user@domain.invalid
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.0.2) Gecko/20030208 Netscape/7.02
X-Accept-Language: en-us, en
MIME-Version: 1.0
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Troubles with services
References: <3ed1e176@newsgroups.borland.com>
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 141.151.183.248
X-Trace: newsgroups.borland.com 1053988202 141.151.183.248 (26 May 2003 15:30:02 -0700)
Lines: 17
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-06!sn-xit-01!sn-xit-09!supernews.com!news.maxwell.syr.edu!small1.nntp.aus1.giganews.com!border1.nntp.aus1.giganews.com!nntp.giganews.com!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail