On 26.03.2011 09:40, Oto BREZINA wrote:
> On 2011-03-15 22:27, Oto BREZINA wrote:
>> On 2011-03-15 22:09, Stefan Küng wrote:
>>>
>>> That's why I don't like to use wrapper classes if there's no way to
>>> make them work in all situations, or break *reliably* in situations
>>> where it must not be used.
>> I still don't think that there is no way to make it working in all
>> situations, just not sure as worthy it is.
>>> And I think that's exactly the reason why the existing CHandle class
>>> only supports NULL as the invalid value and not INVALID_HANDLE_VALUE.
>> Sounds as good start point for me :)
>>
>> Let say:
>> - Invalid is only NULL,
>> - INVALID_HANDLE_VALUE - don't call CloseHandle
>> - You are forced to enter invalid value into constructor
>> CTsvnHandle::CTsvnHandle(HANDLE h, HANDLE hInvalid) ....
>> m_h = (h==hInvalid) ? NULL : h;
>>
>> BIG BAD new invalid value is NULL while you code always checks for
>> INVALID_HANDLE_VALUE.
>> Even this may be handled in operator= method
> May we try to collect all requirements?
I've got something working. Need to do some more tests before I commit
the change (which is quite big, considering that handles are used
throughout the app).
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=2714300
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2011-03-26 09:47:27 CET