I like to get information from an Active Directory using the OLE ADSystemInfo.
In VBS this works easy:
https://ss64.com/vb/syntax-userinfo.html
In Harbour I get here:
Code: Select all
LOCAL oAD, oUser
oAD := CreateObject( "ADSystemInfo" )
oUser := oAD:UserName
MsgDebug (oAD:UserName)
In Foxpro this function existed:
https://harbour.wiki/index.asp?page=Sho ... &InFrame=Y
I found a feature request the also make this feature available:
https://www.mail-archive.com/harbour@ha ... 13937.html
I like to achieve:
Code: Select all
* Replace "DomainName" with the domain name, and "UserLoginID"
* with the login ID of the user you are looking up.
oUser = GetObject("WinNT://DomainName/UserLoginID,user")
? oUser.FullName
Theo