Article View: borland.public.cppbuilder.nativeapi
Article #5483Re: Copy Files
From: JF Jolin
Date: Tue, 09 Aug 2005 18:15
Date: Tue, 09 Aug 2005 18:15
26 lines
1839 bytes
1839 bytes
Alexander Adam <sdg@dg.dg> wrote:
> hmm okay.. not sure what exactly is wrong on that now.. could u give me a
> hint?
>
> thanks!
>
When you use SetClipboardData(uFormat, hMem) with uFormat CF_HDROP then
hMem is the handle of a double - null-terminated list of file names.
Something like _T("C:\\boot.ini\0" "C:\\windows\\win.ini\0")
so the end of the list is a double - null-terminated list of file names (ie
\0\0)
If you use an instruction like strcpy on such a list.
The destination will contain only the first file name (single null-
terminated).
Because strcpy copies until the first null character.
I wouldn't be surprise that code's corrections from J. Benedicto makes the
clipboard holding good drag 'n drop files to be used with DragQueryFile().
--
JF Jolin
Technical Details
Message-ID:
<opsu86bqcvz6rw7b@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mailReferences:
<42f6a8ab@newsgroups.borland.com> <42f6abc3$1@newsgroups.borland.com> <42f70f22$1@newsgroups.borland.com> <opsu66wbwjz6rw7b@newsgroups.borland.com> <42f8cc32$1@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Thread: 10cc67,a3b46c11acc1d35f X-Google-Attributes: gid10cc67,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: borland.public.cppbuilder.nativeapi Subject: Re: Copy Files References: <42f6a8ab@newsgroups.borland.com> <42f6abc3$1@newsgroups.borland.com> <42f70f22$1@newsgroups.borland.com> <opsu66wbwjz6rw7b@newsgroups.borland.com> <42f8cc32$1@newsgroups.borland.com> Message-ID: <opsu86bqcvz6rw7b@newsgroups.borland.com> Content-Type: text/plain; charset=iso-8859-15; format=flowed From: JF Jolin <jfj@nospam.com> MIME-Version: 1.0 Date: Tue, 09 Aug 2005 14:15:16 -0400 User-Agent: Opera7.11/Win32 M2 build 2887 NNTP-Posting-Host: 66.158.140.220 X-Trace: newsgroups.borland.com 1123611316 66.158.140.220 (9 Aug 2005 11:15:16 -0700) Lines: 26 Path: arc1-ca.pugleaf.net!g2news1.google.com!news3.google.com!news.glorb.com!newsfeed.hal-mli.net!feeder1.hal-mli.net!news-out.newsfeeds.com!propagator3-LAX.newsfeeds.com!news-in.spamkiller.net!news-in.superfeed.net!caladan.landsraad.net!newsgroups.borland.com!not-for-mail