Ich weiss zwar nicht, was Du in der Proc erreichen willst, aber für die RootNode gibt die wohl immer
nil zurück.
Code:
{Copy & Paste from VirtualTrees.pas by http://www.delphi-gems.com}
function TBaseVirtualTree.GetNodeData(Node: PVirtualNode): Pointer;
// Returns the address of the user defined data area in the node.
begin
Assert(FNodeDataSize > 0, 'NodeDataSize not initialized.');
if (FNodeDataSize <= 0) or (Node = nil) [u][b][color=#ff0008]or (Node = FRoot) [/color][/b][/u]then
Result := nil
else
Result := PChar(@Node.Data) + FTotalInternalDataSize;
end;
...
...