ATOUTFOX
COMMUNAUTÉ FRANCOPHONE DES PROFESSIONNELS FOXPRO
Visual FoxPro : le développement durable

Forum AtoutFox : Re: GetEnv('username') et GetUserName()   

Sujet

rss Flux RSS des derniers messages

Vous devez vous identifier pour pouvoir poser une question ou répondre.

ven. 01 mars 2013, 10h09

FoxInCloud (Th. Nivelet)
France France

atoutfox.public.association

Re: GetEnv('username') et GetUserName()

La liste des processus, super, merci P@trick ! Pense-tu pouvoir appliquer la même technique pour lister les sessions interactives ouvertes et le compte utilisateur qui les a ouvertes ?

J'ai trouvé cet article qui semble faire référence en la matière : http://www.codeproject.com/Articles/7483/Enumerating-Logon-Sessions
Il utilise la fonction Windows API LsaEnumerateLogonSessions() : http://msdn.microsoft.com/fr-fr/library/windows/desktop/aa378275%28v=vs.85%29.aspx

NTSTATUS NTAPI LsaEnumerateLogonSessions(
_Out_ PULONG LogonSessionCount,
_Out_ PLUID *LogonSessionList
);
Parameters :
- LogonSessionCount [out] : Pointer to a long integer that receives the number of elements returned in the array returned in LogonSessionList parameter.
- LogonSessionList [out] : Address of a pointer to a LUID. The pointer receives the first element of an array of logon session identifiers. The memory used by the array is allocated by the LSA. When the array is no longer needed, call the LSAFreeReturnBuffer function to free it.

Comme http://www.news2news.com/vfp/index.php#charL ne parle pas de LsaEnumerateLogonSessions(), je présume qu'il faut écrire une fll pour y accéder ...

++
thn

Permalink : http://www.atoutfox.org/nntp.asp?ID=0000011337
20 286 messages dans le forum • Liste complète des messages

www.atoutfox.org - Site de la Communauté Francophone des Professionnels FoxPro - v3.4.0 - © 2004-2026.
Cette page est générée par un composant COM+ développé en Visual FoxPro 9.0-SP2-HF3