Also, note that some messages require the messageloop to be attached to an actual visible window.
WM_COPYDATA is -afaik- among those.
There's a sample on MSDN that shows how WM_COPYDATA works.