heres an example of WM_COPYDATA
code:
/*
typedef struct {
DWORD dwData; 4
DWORD cbData; 4
PVOID lpData; 4
} COPYDATASTRUCT; 12
*/
var struct = Interop.Allocate(12);
Interop.Call('Kernel32','RtlMoveMemory', struct, lParam,12);
var dwData = struct.ReadDWORD(0);
var cbData = struct.ReadDWORD(4);
var lpData = struct.ReadDWORD(8);