Szybkie szukanie
Słowo kluczowe:
sobota, 11 luty 2012
Start arrow Tips & Tricks arrow Kto jest zalogowany (wysłał:Knight Lore''FC )
Kto jest zalogowany (wysłał:Knight Lore''FC ) Drukuj E-mail
Napisał Administrator   
niedziela, 12 luty 2006

Kto jest zalogowany?

Private Declare Function WNetGetUser Lib "mpr.dll" Alias "WNetGetUserA" (ByVal _
lpszLocalName As String, ByVal lpszUserName As String, _
lpcchBuffer As Long) As Long

' return the current default user name or
' the user name used to establish a connection

Function NetworkUserName() As String
Dim buffer As String
buffer = Space$(256)
' if the WNetGetUser API returns 0, then
' the user name is in buffer
If WNetGetUser(vbNullString, buffer, Len(buffer)) = 0 Then
NetworkUserName = Left$(buffer, InStr(buffer, vbNullChar) - 1)
End If
End Function




Komentarze

Aby dodać komentarz zaloguj się. Jeśli nie masz konta, załóż je sobie.
Tylko zarejestrowani użytkownicy mogą pisać komentarze.

Powered by AkoComment 2.0!

< Poprzedni   Następny >

Menu główne
Start
Teoria
VB.NET
Api
Tips & Tricks
Warsztat
VBMagazine
Pliki
Forum
Literatura
Ankiety
Linki
Szukaj
Wyślij program
Napisz do nas
Redakcja
Logowanie
Login

Hasło

Zapamiętaj mnie
Nie pamiętasz hasła?
Nie masz konta? Załóż je sobie
Gościmy
Aktualnie jest 24 gości online
Statystyka
Użytkownicy: 11345
Newsy: 237
Odnośniki: 48
Odwiedzających: 4328148
Mambo is Free Software released under the GNU/GPL License.