🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Content missing when using clipboard API calls

#13089
From: Kris
Date: Sun, 26 Oct 2003 12:33
23 lines
1713 bytes
I've have increased the allocated buffer and content I'm copying from
string.c_str() with 1 byte (to also take the trailing NULL into
consideration) and everything is OK now.

Thanks,

On Sat, 25 Oct 2003 08:14:37 -0700, Bob Gonder
<notbg@notmindspring.invalid> wrote:

>Kris wrote:
>
>>When executing the code below and putting the data contained in
>>TEXT_ClipboardData (which is "PLAIN TEXT SAMPLE") I will only get
>>"PLAIN TEXT SAMPL" (i.e. the last char is missing).
>>
>>Sure, I can really easily solve this by making the buffer just 1 byte
>>longer but I really would like to know why this is happening ?
>>   SetClipboardData(CF_TEXT,TEXT_hglbCopy);
>
>CF_TEXT ends on a NULL.
>You aren't providing a NULL.
>
>
Technical Details
Message-ID: <9mfnpvkd7ei80qme5a9buhmb5foi0eb0ko@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <cq9kpv03v7gookvn5ao482qv0bl7352eva@4ax.com> <qb4lpvki17hq4maletbua9t8cm4ol4qijc@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10cc67,8c9761db6f386d91
X-Google-Attributes: gid10cc67,public
X-Google-ArrivalTime: 2003-10-26 04:39:03 PST
From: Kris <myEmail@email.com>
Newsgroups: borland.public.cppbuilder.nativeapi
Subject: Re: Content missing when using clipboard API calls
Date: Sun, 26 Oct 2003 13:33:20 +0100
Message-ID: <9mfnpvkd7ei80qme5a9buhmb5foi0eb0ko@4ax.com>
References: <cq9kpv03v7gookvn5ao482qv0bl7352eva@4ax.com> <qb4lpvki17hq4maletbua9t8cm4ol4qijc@4ax.com>
X-Newsreader: Forte Agent 1.93/32.576 English (American)
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 212.239.132.177
X-Trace: newsgroups.borland.com 1067171590 212.239.132.177 (26 Oct 2003 04:33:10 -0700)
Lines: 24
Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail