Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
; NameUnknown = 0, ; NameFullyQualifiedDN = 1, ; NameSamCompatible = 2, ; NameDisplay = 3, ; NameUniqueId = 6, ; NameCanonical = 7, ; NameUserPrincipal = 8, ; NameCanonicalEx = 9, ; NameServicePrincipal = 10, ; NameDnsDomain = 12 ; ;BOOLEAN GetUserNameEx( ; EXTENDED_NAME_FORMAT NameFormat, ; LPTSTR lpNameBuffer, ; PULONG nSize ;); #DefineFunction GetUserNameEx(type) dll=StrCat(DirWindows(1),"secur32.dll") bbsize=1000 bb=BinaryAlloc(bbsize) BinaryEodSet(bb,bbsize) bbs=BinaryAlloc(4) BinaryPoke4(bbs,0,bbsize) DllCall(dll,long:"GetUserNameExA",long:type,lpbinary:bb,lpbinary:bbs) retval=BinaryPeekStr(bb,0,bbsize) BinaryFree(bb) BinaryFree(bbs) Return(retval) #EndFunction ;demo For xx=0 To 12 uname=GetUserNameEx(xx) Message("Name code type = %xx%",uname) Next Message("All","Done")
Article ID: W16039
File Created: 2004:03:30:15:42:26
Last Updated: 2004:03:30:15:42:26