Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
GetLoginAuthenticationServer
Message
 
 
To
21/09/2001 12:49:09
Monte Murdock
Universal American Mortgage Company
Clearwater, Florida, United States
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00559348
Message ID:
00571719
Views:
48
>I would like to get the Login Authentication Server for a user logging into an NT Domain, does anyone know of any API method to do that?
>
>MOnTe

Monte,
With VFP 7 and Ed Rauh's CLSHEAP class from the Download section, you can do the following (if you still need it):
declare integer NetGetDCName in netapi32 string, string, string@
lcserver = 0
lcdomain = 0
lcbuff = replicate(chr(0),255)
if NetGetDCName(lcserver, lcdomain, @lcbuff) = 0 then
   * fills lcbuff with a character representation of a pointer value
   * use the DWORDtoNum function in CLSHeap to translate it for the new
   * VFP 7 function SYS(2600)
   set procedure to clsheap

   * The name of the PDC is stored in the result using UNICODE
   * so we need to apply the necessary reverse functions via
   * STRCONV() to get single byte strings
   lcretval =  strconv(strconv(sys(2600,DWordtoNum(lcbuff),255),6),2)

   * The name of the PDC is NULL terminated so we need to truncate at the
   * first CHR(0) (now that we have eliminated the embedded CHR(0) for UNICODE)
   ? left(lcretval,at(chr(0),lcretval)-1)
endif
HTH.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform