Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com X-Injected-Via-Gmane: http://gmane.org/ To: cygwin AT cygwin DOT com From: Soren A Subject: Re: example needed pls: `cygpath -c ' Date: Wed, 2 Jul 2003 19:19:30 +0000 (UTC) Organization: Occasionally Sporadically Lines: 27 Message-ID: References: <3EFE120B DOT 58A0C79E AT dessent DOT net> <20030701040434 DOT GE7604 AT ny-kenton2a-710 DOT buf DOT adelphia DOT net> <3F018740 DOT B28F53DC AT dessent DOT net> <3F018D6C DOT EA1226CA AT dessent DOT net> <3F021C46 DOT C8F4CE31 AT dessent DOT net> <3F02DA32 DOT EAD1FC18 AT dessent DOT net> <3F02DD3F DOT 3EAA4D3E AT dessent DOT net> X-Complaints-To: usenet AT main DOT gmane DOT org User-Agent: Xnews/L5 X-Archive: encrypt Brian Dessent wrote around 02 Jul 2003 news:3F02DD3F DOT 3EAA4D3E AT dessent DOT net: > Oops, I left off a call to GlobalFree(hglbBuffer); before exiting. Or > maybe not, I'm not sure with this global heap business that you have to > use when working with the clipboard... Anybody know if the system frees > that clipboard data the next time the clipboard is emptied, or do you > have to do it before your program exits? You did it right. A book I have [Windows 98 Developers Handbook, Ezzell & Blaney, Sybex, 1998] says Do not under any circumstances free memory after transferring a data object to the clipboard. [...] The result of calling GlobalFree would delete the item from the clipboard. Instead, once a data item has been transferred, ownership of the item has also been transferred, and the local handle should not be used or tampered with further. You are correct in guessing that the next time an application calls EmptyClipboard the global memory is freed by the Clipboard itself. -- "So, tell me, my little one-eyed one, on what poor, pitiful, defenseless planet has my MONSTROSITY been unleashed?" - Dr. Jumba, Disney's "Lilo & Stitch" OpenPGP Key at http://savannah.gnu.org/people/viewgpg.php?user_id=6050 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/