🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

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

#14825
From: Leo Havm�ller
Date: Thu, 31 Jul 2003 09:23
16 lines
1529 bytes
"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: <3f28e023$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3f28c2fd$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 02:40:06 PST
From: "Leo Havm�ller" <leh@-nospam-rtx.dk>
Newsgroups: borland.public.cppbuilder.nativeapi
References: <3f28c2fd$1@newsgroups.borland.com>
Subject: Re: Overlapped I/O operation is in progress - Service functions
Date: Thu, 31 Jul 2003 11:23:47 +0200
Lines: 18
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 80.63.27.146
Message-ID: <3f28e023$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1059643427 80.63.27.146 (31 Jul 2003 02:23:47 -0700)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.online.be!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail