Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
GetLoginAuthenticationServer
Message
De
24/10/2001 09:45:13
Monte Murdock
Universal American Mortgage Company
Clearwater, Floride, États-Unis
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00559348
Message ID:
00572565
Vues:
37
Thank you.

>>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.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform