Re: Win32Lib getUserName() problem

new topic     » goto parent     » topic index » view thread      » older message » newer message
AndyDrummond said...

Is there any way that anyone knows whereby I can get the current user's name, rather than the name the current account was created with?

I'm not sure what Win32Lib is doing, exactly, but you might want to take a look at GetUserNameEx. There appear to be many different ways to get a name:

typedef enum  { 
  NameUnknown            = 0, 
  NameFullyQualifiedDN   = 1, 
  NameSamCompatible      = 2, 
  NameDisplay            = 3, 
  NameUniqueId           = 6, 
  NameCanonical          = 7, 
  NameUserPrincipal      = 8, 
  NameCanonicalEx        = 9, 
  NameServicePrincipal   = 10, 
  NameDnsDomain          = 12  
} EXTENDED_NAME_FORMAT, *PEXTENDED_NAME_FORMAT; 

Matt

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu