This is my next question following Hook into a child class SysTreeView32 of VBE window
I can access the SysTreeView32 now but I cant access the child node of the hN
This:
childNode = SendMessage(hNode, TVM_GETNEXTITEM, 0&, 0&)
Is not asking for a child node. Firstly, you're sending the message to hNode, not the tree control, which makes no sense at all. Then, to get the child node, you need to pass the TVGN_CHILD flag, which is 0x4, in wParam. You also need to pass the item you want the child of in lParam.
So it would probably look something like this:
childNode = SendMessage(hWndTvw, TVM_GETNEXTITEM, TVGN_CHILD, hNode)
See the docs for the TVM_GETNEXTITEM message for more information.