🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Overlapped I/O operation is in progress - Service functions

#14840
From: Maurice Anderson
Date: Fri, 01 Aug 2003 02:07
41 lines
2479 bytes
> The last errorcode is only updated if OpenService fails, so what you see
is
> whatever value the last error already had.
> You should only call GetLastError() if some Win32 function fails - the
> documentation for the Win32 functions specifically state when
GetLastError()
> can be used to get additional information.

Yes.  I understand the purpose of the GetLastError function.  But what does
the "Overlapped I/O operation is in progress" error returned by GetLastError
and how can I overcome it.  This is of course assuming the last error is
indeed "Overlapped I/O operation is in progress".

Thanks,

-M-



"Leo Havm�ller" <leh@-nospam-rtx.dk> wrote in message
news:3f28e023$1@newsgroups.borland.com...
> "Maurice Anderson" <mauriceanderson@hotmail.com> wrote in message
> news:3f28c2fd$1@newsgroups.borland.com...
> > I have this code:
> >
> >  SC_HANDLE hService = ::OpenService(hSCM, szSvcName,
> > SERVICE_PAUSE_CONTINUE);
> >
> >  PrintError(GetLastError());
>
> The last errorcode is only updated if OpenService fails, so what you see
is
> whatever value the last error already had.
> You should only call GetLastError() if some Win32 function fails - the
> documentation for the Win32 functions specifically state when
GetLastError()
> can be used to get additional information.
>
> Leo Havm�ller.
>
>
Technical Details
Message-ID: <3f29cac6$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!205.215.62.125.MISMATCH!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f28c2fd$1@newsgroups.borland.com> <3f28e023$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 10cc67,61a755f387ee0607
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-07-31 19:09:31 PST
From: "Maurice Anderson" <mauriceanderson@hotmail.com>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f28c2fd$1@newsgroups.borland.com> <3f28e023$1@newsgroups.borland.com>
Subject: Re: Overlapped I/O operation is in progress - Service functions
Date: Thu, 31 Jul 2003 19:07:48 -0700
Lines: 43
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
NNTP-Posting-Host: 64.30.203.223
Message-ID: <3f29cac6$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059703494 64.30.203.223 (31 Jul 2003 19:04:54 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-04!sn-xit-01!sn-xit-09!supernews.com!216.170.153.135.MISMATCH!tdsnet-transit!newspeer.tds.net!205.215.62.125.MISMATCH!in.100proofnews.com!in.100proofnews.com!nntp.infostrada.it!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail