Click here to Skip to main content
16,004,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Process Information Pin
Hamid_RT9-Oct-06 21:46
Hamid_RT9-Oct-06 21:46 
QuestionGetting the current logged in Windows user name Pin
Sujith(ARS)9-Oct-06 20:42
Sujith(ARS)9-Oct-06 20:42 
QuestionRe: Getting the current logged in Windows user name Pin
kakan9-Oct-06 22:12
professionalkakan9-Oct-06 22:12 
AnswerRe: Getting the current logged in Windows user name Pin
Galatei9-Oct-06 23:05
Galatei9-Oct-06 23:05 
AnswerRe: Getting the current logged in Windows user name Pin
Haroon Sarwar9-Oct-06 23:31
Haroon Sarwar9-Oct-06 23:31 
GeneralRe: Getting the current logged in Windows user name Pin
Galatei10-Oct-06 2:22
Galatei10-Oct-06 2:22 
QuestionGetting the current logged in Windows user name when running as an service Pin
Sujith(ARS)9-Oct-06 20:41
Sujith(ARS)9-Oct-06 20:41 
AnswerRe: Getting the current logged in Windows user name when running as an service Pin
Galatei10-Oct-06 1:19
Galatei10-Oct-06 1:19 
Hi,

Every application is executed under specific account, if you doubleclick on application icon on your desktop, this application will be executed under your account (if allowed). Using GetUserName/Ex will always return username of the account used to launch your application (associated with your thread).
Considering service, in your case it is Local System account which is used to lauch your service, that's why you get SYSTEM as user name for this account.

If you wish to get name of currently logged on user, you should use
NetWkstaUserGetInfo<br />
function to get info on your local computer, or enumerate users with NetWkstaUserEnum function.

Hope that helps.

Best regards
QuestionProblem with compiling the VC++ code Pin
Dinu_IP9-Oct-06 20:10
Dinu_IP9-Oct-06 20:10 
AnswerRe: Problem with compiling the VC++ code Pin
Naveen9-Oct-06 21:46
Naveen9-Oct-06 21:46 
QuestionRecursing Subdirectory Pin
ayan_00_arup9-Oct-06 20:00
ayan_00_arup9-Oct-06 20:00 
AnswerRe: Recursing Subdirectory Pin
Naveen9-Oct-06 20:15
Naveen9-Oct-06 20:15 
AnswerRe: Recursing Subdirectory Pin
Hamid_RT9-Oct-06 20:15
Hamid_RT9-Oct-06 20:15 
AnswerRe: Recursing Subdirectory Pin
Galatei10-Oct-06 2:28
Galatei10-Oct-06 2:28 
Questionhow to catch console message Pin
Gongya Yu9-Oct-06 19:27
Gongya Yu9-Oct-06 19:27 
AnswerRe: how to catch console message Pin
Galatei10-Oct-06 2:31
Galatei10-Oct-06 2:31 
GeneralRe: how to catch console message Pin
Gongya Yu10-Oct-06 5:04
Gongya Yu10-Oct-06 5:04 
QuestionHow can we add the PNG images to Dialog boxes and other controls Pin
johnalek9-Oct-06 19:18
johnalek9-Oct-06 19:18 
AnswerRe: How can we add the PNG images to Dialog boxes and other controls Pin
Hamid_RT9-Oct-06 19:40
Hamid_RT9-Oct-06 19:40 
GeneralRe: How can we add the PNG images to Dialog boxes and other controls Pin
johnalek9-Oct-06 19:58
johnalek9-Oct-06 19:58 
GeneralRe: How can we add the PNG images to Dialog boxes and other controls Pin
Hamid_RT9-Oct-06 20:16
Hamid_RT9-Oct-06 20:16 
QuestionBug when restoring state of docked windows Pin
lastgen9-Oct-06 19:16
lastgen9-Oct-06 19:16 
AnswerRe: Bug when restoring state of docked windows Pin
Rajesh R Subramanian10-Oct-06 0:16
professionalRajesh R Subramanian10-Oct-06 0:16 
GeneralRe: Bug when restoring state of docked windows Pin
lastgen12-Oct-06 15:42
lastgen12-Oct-06 15:42 
QuestionAvoiding redefinition of INT8 Pin
Padmanabh Sharma9-Oct-06 19:05
Padmanabh Sharma9-Oct-06 19:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.