Page 1 of 1

OLE

Posted: Sat Mar 11, 2023 8:05 pm
by trmpluym
Dear friends,

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)
But now the next part: GETOBJECT()

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
Somebody knows ?

Theo

Re: OLE

Posted: Tue Mar 14, 2023 1:39 am
by andyglezl
Por lo que he leído, necesitas un entorno de WinServer xxxx.
Quien lo tenga o lo use, te podría decir.
*---------------------------------------------------------------------
From what I've read, you need a WinServer xxxx environment.
Whoever has or uses it could tell you.