I can't find anything wrong with the code.
But for NetMessageBufferSend to work the Messanger Service must be enabled on the NT computers which it isn't by default on NT4.
Start the Control Panel and Services and check if the Messanger Service is enabled.