I need to retrieve the name and domain of the currently authenticated
user (using VC++6.0).

The problem is, I cannot use GetUserName or GetUserNameEx, since I have
to find out the user information from within a DLL, that is loaded by a
service. The domain returned by GetUserNameEx is okay, but the user I
get back is something like SYSTEM and such.

Changing the logon for the service that loads the DLL is not an option.

Any suggestions are more than welcome.