NetMessageNameGetInfo or Net32MessageNameGetInfo

The NetMessageNameGetInfo API retrieves information about a particular user's entry in the message name table.

Data returned at a level of 0 provides only the name of the user or application. A level 1 structure provides the name of the user and indicates whether message forwarding is available and, if so, to whom the messages are forwarded.

This API requires that the Messenger service be started.