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

Re: svn commit: r18287 - trunk/src/TortoiseProc/AppUtils.cpp

From: Stefan Küng <tortoisesvn_at_gmail.com>
Date: Mon, 11 Jan 2010 19:31:29 +0100

On 11.01.2010 11:43, Stefan Fuhrmann wrote:
> Stefan Küng<tortoisesvn_at_gmail.com
> <mailto:tortoisesvn_at_gmail.com?Subject=Re:%20svn%20commit:%20r18287%20-%20trunk/src/TortoiseProc/AppUtils.cpp>>
> wrote:
>>
>> On Mon, Jan 11, 2010 at 02:23, Stefan Fuhrmann
>> <stefanfuhrmann_at_alice-dsl.de> wrote:
>> /> Author: sf /
>> /> Date: 2010-01-10 17:23:29-0800 /
>> /> New Revision: 18287 /
>> /> /
>> /> Modified: /
>> /> Â trunk/src/TortoiseProc/AppUtils.cpp /
>> /> /
>> /> Log: /
>> /> partially revert r18031 as AssocQueryString is broken under XP /
>>
>> broken how? MSDN doesn't mention anything about assocQueryString()
>> being different under XP.
> All of the following sequences return E_POINTER:
>
> DWORD buflen = 0;
> AssocQueryString(ASSOCF_INIT_DEFAULTTOSTAR, ASSOCSTR_COMMAND,
> extensionToUse, _T("edit"), NULL,&buflen);
>
> DWORD buflen = 2000;
> AssocQueryString(ASSOCF_INIT_DEFAULTTOSTAR, ASSOCSTR_COMMAND,
> extensionToUse, _T("edit"), NULL,&buflen);
>
> DWORD buflen = 2000;
> auto_buffer<TCHAR> cmdbuf (buflen + 1);
> AssocQueryString(ASSOCF_INIT_DEFAULTTOSTAR, ASSOCSTR_COMMAND,
> extensionToUse, _T("edit"), cmdbuf,&buflen);
>
> In particular, cmdbuf remains undefined which causes application
> to be undefined and usually not empty.
>
> Some people with the same problem:
>
> http://www.tek-tips.com/viewthread.cfm?qid=532156&page=14

Works fine for me in my XP VM. Strange.
I would suggest to change the code so that if E_POINTER is returned to
fall back to the registry code, not by checking for XP. It seems it
doesn't fail because the OS is XP but for some other reason - a reason
which could very well happen on other OS versions too.

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=2436357
To unsubscribe from this discussion, e-mail: [dev-unsubscribe_at_tortoisesvn.tigris.org].
Received on 2010-01-11 19:31:37 CET

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.