The pointer to NMTVDISPINFO is the same as the pointer to TV_DISPINFO.
What you need to do is use RtlMoveMemory to copy the lParam memory to another location that is of adequate size.
Javascript code:
function OnWindowEvent_MessageNotification(pPlusWnd, nMessage, wParam, lParam) {
if (nMessage === WM_NOTIFY) {
/*
NMHDR : 12
TVITEM : 40
*/
var NMTVDISPINFO = Interop.Allocate(52);
Interop.Call('kernel32', 'RtlMoveMemory', NMTVDISPINFO, lParam, 52);
}
}