This is easy actually, I asked the same question a while back:
code:
var pNmhdr = Interop.Allocate(12); // if this is the wrong size sorry
Interop.Call('Kernel32.dll', 'RtlMoveMemory', pNmhdr.DataPtr, lParam, pNmhdr.Size);
// do stuff with pNmhdr
If you want to modify the structure, just call RtlMoveMemory again with the opposite parameters after you're all done modifying it:
code:
Interop.Call('Kernel32.dll', 'RtlMoveMemory', lParam, pNmhdr.DataPtr, pNmhdr.Size);
PS: How are you subclassing the control? Dll? or are you just processing the notifications it sends to the parent window?