> does anyone know how to find out the logged in user with domain in vc++ ?
the simplest method is probably to use
GetUserNameEx
it allows you to get different name formats that represent the current user.
the NT4 compatible format is of the form domain\user. you should be able to
parse this string without much problems to extract user name and domain.
another approach that uses the platform authentication functions can be
found in knowledgebase article Q111544:
ms-help://MS.VSCC.2003/MS.MSDNQTR.2003FEB.1033/enu_kbwin32sdk/en-us/win32sdk/Q111544.htm
--
Kind regards,
Bruno.
br**********************@hotmail.com
Remove only "_nos_pam"