[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [patch, suggestion, notes] for Applying CAutoHandle (r21053, r21058)

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 28 Mar 2011 20:31:16 +0200

On 28.03.2011 20:05, Oto BREZINA wrote:
> On 2011-03-28 18:34, Stefan Küng wrote:
>> On 28.03.2011 18:02, Oto BREZINA wrote:
>>> On 2011-03-28 16:47, Stefan Küng wrote:
>>>>
>>> Interesting. As GetCurentProcess() pseudo-handle can be closed and share
>>> value with INVALID_HANDLE_VALUE, thus INVALID_HANDLE_VALUE can be closed
>>> too?
>>> Correct?
>> Yes, correct.
>> As stated in
>> http://msdn.microsoft.com/en-us/library/ms683179%28VS.85%29.aspx
>>
>> "Calling the CloseHandle function with a pseudo handle has no effect.".
> I'm getting confused now. Would this lead to exception with debugger
> hooked or not? If not, do we need handle CAutoFile differently to
> CAutoGeneralHandle?
> Yes, we do - because of IsValid. I get it.

No, this won't lead to an exception in a debugger.

And CAutoFile already is different than CAutoGeneralHandle: CAutoFile
has INVALID_HANDLE_VALUE as the invalid handle value, while
CAutoGeneralHandle has NULL as the invalid handle value.

Stefan

-- 
        ___
   oo  // \\      "De Chelonian Mobile"
  (_,\/ \_/ \     TortoiseSVN
    \ \_/_\_/>    The coolest Interface to (Sub)Version Control
    /_/   \_\     http://tortoisesvn.net
------------------------------------------------------
http://tortoisesvn.tigris.org/ds/viewMessage.do?dsForumId=757&dsMessageId=2714816
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-03-28 20:31:38 CEST

This is an archived mail posted to the TortoiseSVN Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.