🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: How to know if SetClipboardViewer() or ChangeClipboardChain() succeded?

#4821
From: Alan Bellingham
Date: Fri, 25 Nov 2005 16:56
30 lines
1819 bytes
"Vladimir Stefanovic" <antivari@po.sbb.co.yu> wrote:

>How to know if SetClipboardViewer() or ChangeClipboardChain()
>succeded?

[snip]

>If I understoud well, only GetLastError() can tell the truth, but what
>should I look for?
>
>Maybe:
>1411L = ERROR_CLASS_DOES_NOT_EXIST ?
>
>What about ChangeClipboardChain() ?

What you do is as follows:

a) Call SetLastError(0);
b) Call the function
c) If the result is null, then look at GetLastError()
d) If the result isn't zero, you had an error

Note that step (a) means that you won't be seeing some error from
(possibly) hours earlier. Windows API functions never (so far as I know)
clear the error state. They are permitted to, but none (I could find)
are documented to do so.

Alan Bellingham
-- 
ACCU Conference 2006 - 19-22 April, Randolph Hotel, Oxford, UK
Technical Details
Message-ID: <s7geo113qb3cl4uit6kvtghnfinlqmkfea@4ax.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <43873d96@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,dd1b0de06caf5174
X-Google-Attributes: gid10cc67,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: Alan Bellingham <alanb@episys.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: How to know if SetClipboardViewer() or ChangeClipboardChain() succeded?
Date: Fri, 25 Nov 2005 16:56:18 +0000
Reply-To: alanb@episys.com
Message-ID: <s7geo113qb3cl4uit6kvtghnfinlqmkfea@4ax.com>
References: <43873d96@newsgroups.borland.com>
X-Newsreader: Forte Agent 3.1/32.783
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 193.129.251.253
X-Trace: newsgroups.borland.com 1132937748 193.129.251.253 (25 Nov 2005 08:55:48 -0700)
Lines: 30
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!meganewsservers.com!feeder2.on.meganewsservers.com!news-out.newsgroups.com!propagator2-sterling.newsfeeds.com!in.nntp.be!caladan.landsraad.net!newsgroups.borland.com!not-for-mail