none
TreeView control from comctl32.dll failing on 64 bits RRS feed

  • Question

  • I have an app using a TreeView control from comctl32.dll working perfectly on 32 bits

    but the 64 bits version crashes when calling TreeView_SetBkColor() or some other TreeView macro using SendMessage()...

    I have checked comctl32.dll versions, 5.82 in both cases and in 64 bits is loading the dll from \winxsx\amd64_microsoft... then the loaded dll seems to be ok

    The program crashes with :

    Unhandled exception at 0x400b0e70 in Test64.exe: 0xC0000005: Access violation at location 0x00000000400b0e70.

    any idea? Thanks.

    Saturday, August 20, 2011 8:42 AM

Answers

  •  solved the crash.. some (LONG) should have been (LONG_PTR)

    thanks

    • Marked as answer by Rob Pan Friday, August 26, 2011 2:28 AM
    Saturday, August 20, 2011 11:29 PM

All replies

  • I have an app using a TreeView control from comctl32.dll working perfectly on 32 bits

    but the 64 bits version crashes when calling TreeView_SetBkColor() or some other TreeView macro using SendMessage()...

    I have checked comctl32.dll versions, 5.82 in both cases and in 64 bits is loading the dll from \winxsx\amd64_microsoft... then the loaded dll seems to be ok

    The program crashes with :
    Unhandled exception at 0x400b0e70 in Test64.exe: *0xC0000005: Access violation*at location 0x00000000400b0e70.

    Pat,

    Can you reproduce this in a simple application that you could share
    the source code with us?

    Dave

    Saturday, August 20, 2011 8:56 AM
  • it is not exactly the "same code"

    the link has a VS2008 tiny project compiling 32 and 64 debug versions of a similar app

    the project loads the exact same comctl32.dll version, this time it does not crash but see the tree looks/behaves different

    http://www.2shared.com/file/2mM6bsjG/TreeView-32-64.html

    that means the same version of comctl32.dll is really different if 32 or 64 bits??

    I think my crashing problem is related to this...

    any idea?

     

     

    Saturday, August 20, 2011 11:15 AM
  • it is not exactly the "same code"
    the link has a VS2008 tiny project compiling 32 and 64 debug versions of a similar app
    the project loads the exact same comctl32.dll version, this time it does not crash but see the tree looks/behaves different
    http://www.2shared.com/file/2mM6bsjG/TreeView-32-64.html

    I've no idea what that is, but I'm not particularly interested in
    running something called iLividSetupV1.exe.

    If you can provide some source code and minimal repro steps that
    anyone can use to reproduce your crash, I'm sure someone will be able
    to help.

    Dave

    Saturday, August 20, 2011 12:50 PM
  • http://www.2shared.com/file/2mM6bsjG/TreeView-32-64.html

    I've no idea what that is, but I'm not particularly interested in
    running something called iLividSetupV1.exe.

    Darned adverts! I've found your code now.

    Dave

    Saturday, August 20, 2011 12:57 PM
  • ? sorry but you do not have to run anything...

    I just pressed the download button on the page I gave you and I got the zip I uploaaded before with the VS project source...

    you have the source code on that zip...

    I cannot upload "exactlly" the code that crashes 'cause is very big that's why I've made and uploaded the tiny projet with the relevant code on it...

     

     

     

    Saturday, August 20, 2011 12:59 PM
  •  solved the crash.. some (LONG) should have been (LONG_PTR)

    thanks

    • Marked as answer by Rob Pan Friday, August 26, 2011 2:28 AM
    Saturday, August 20, 2011 11:29 PM
  •  solved the crash..

    Jolly good.

    some (LONG) should have been (LONG_PTR)

    It almost always pays to try compiling with the highest level of
    warning - would that have shown up the issue in this case?

    Dave

    Sunday, August 21, 2011 4:11 PM