|
-
May 20th, 2001, 01:00 PM
#1
Thread Starter
Junior Member
Know which user has logged on system
how can i know through any api or vb function that which user has been logged on the system?
And is there any way to restrict a user from using any file or a folder?
-
May 20th, 2001, 03:59 PM
#2
Code:
Declare Function GetUserName Lib "advapi32.dll" Alias "GetUserNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function usrName() as String
Dim uname as string , rval as long, strlen as long
uname = space(255)
rval = GetUserName(uname,strlen)
usrName = left(uname,strlen)
End Function
-
May 21st, 2001, 05:58 AM
#3
Black Cat
And is there any way to restrict a user from using any file or a folder?
You using NT/2000?
Josh
Get these: Mozilla Opera OpenBSD
I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.
-
May 21st, 2001, 10:23 AM
#4
JoshT didn't mention - The answer is "no" id you're on a Win 9X machine. I don't know how to do it from code on NT. Guess I'll go figure it out....
-
May 21st, 2001, 06:58 PM
#5
Fanatic Member
probably by using the SetFileSecurity API, i'll look into it.
GWDASH
[b]VB6, Perl, ASP, HTML, JavaScript, VBScript, SQL, C, C++, Linux , Java, PHP, MySQL, XML[b]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|