Accessing the MS Tree Control via the SendMessage API causing app to crash in Citrix Presentation Server Client
Does anyone have any experience with this?
I have an application written by a third party that uses the SendMessage API calls to use extended features of the Tree Control as shipped with Visual Basic 6.
This all works fine (and has done for 3-4 years) on the desktop and under Citrix 4 on Windows 2000 Server. Under our currrent setup Citrix 5 on Windows 2003 Server it works fine from the console but in the Presentation Server Client; when the SendMessage() call is used with the TVM_GETITEM or TVM_SETITEM message the entire app crashes, no error messages no log entries, nothing.
I have built a VB6 dev environment under Citrix and, when you step through the code under the Presentation Server Client, the same thing happens taking the IDE out as well.
I would normally expect an error in the parameter struct passed to the SendMessage() call but VB6 is pretty twitchy anyway so I would have thought it would fail on Windows every time. There must be a difference under the Citrix client.
I cannot find any reference to the problem on Google, Cit开发者_如何学Crix website, etc.
Any pointers, ideas suggestions, etc. appreciated.
I don't know anything about Citrix/Presentation server, but one option of last resort open to you may be to try the treeview from the VB5 common controls library (comctl32.ocx).
(I only suggest this because the VB6 tree view (mscomctl.ocx) is unrelated to the "core" win32 common controls treeview (comctl32.dll) - its a completely custom implementation and so has limited support for the treeview API (can't set back/fore colours for example), whereas the VB5 version uses the real thing.
Make sure you are retrieving only TVITEM
attributes by limiting mask
this way:
.mask = .mask And &H7F
... before calling SendMessage
. You can't slap an &FFFF or -1 there, because TVM_GET/SETITEM expect an extended receiving buffer in newer versions of common controls. The new version of the struct is renamed to TVITEMEX
.
精彩评论