I've created a program to implement the NetMessageBufferSend API but unlike the command prompt equivalent ("net send") it currently doesn't work when sending messages to usernames. I was thinking you'd have to specify the domain as well maybe in the format "\\domain\username" but I'm not entirely sure.

Either way can someone direct me towards an API that would return the domain the computer is logged on to or an overall solution.

Cheers, adehh.