Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Using GetObject()
Message
From
04/07/2014 13:45:15
 
 
To
04/07/2014 10:34:14
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2012
Network:
Windows 2008 Server
Database:
MS SQL Server
Application:
Web
Miscellaneous
Thread ID:
01603235
Message ID:
01603242
Views:
66
>Hi All
>
>I am trying to find a way to code GetObject() in WinDev but I am not sure how to do it. I want to access the user's login full name and description as per the help file - from VFP Help:
>
>
>
>   * For example, on a network that has implemented Active Directory Services, 
>   * you can query the network for information on a particular user.
> 
>   *  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
>
>
>
>I cant find a similar thing in WinDev although there are so many functions that it might be there but I just cant find it right now. Is GetObject() calling some sort of Windows API that I could call directly instead? Or is there another approach to getting this info (the user's full name and description) ?

The above code fails with an OLE error on a standalone Win7 machine (i.e. no AD), substituting the local machine name for the domain.

ISTR WMI can be used to get logon info. You can Google [wmi vfp], I think there have been threads here discussing how to access WMI, maybe even logon info.

Having said that, if WinDev is as mature as you've told us I can't imagine there would not be functions that do this for you.
Regards. Al

"Violence is the last refuge of the incompetent." -- Isaac Asimov
"Never let your sense of morals prevent you from doing what is right." -- Isaac Asimov

Neither a despot, nor a doormat, be

Every app wants to be a database app when it grows up
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform