create and use DLL

how would i create and new my own DLL to retrieve and display the username of the user logged into a Win NT machine?

p.s i have never done this before
LVL 16
ellandrdAsked:
Who is Participating?
 
Patrick MatthewsConnect With a Mentor Commented:
Hi ellandrd,

There is no need to make a DLL for this, as an API function already exists:

http://www.mvps.org/access/api/api0008.htm

Regards,

Patrick
0
 
ellandrdAuthor Commented:
but how do i run it so i can display the username in a webpage?
0
 
ellandrdAuthor Commented:
what is mean by new module?  how cani run this? what type of extension does it have?

sorry i have never done anything like this before so it is all new to me...
0
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
PSSUserCommented:
If you're website is using IIS with Integrated Windows Authentication then you can simply use:

  Dim UserName

  UserName = Request.ServerVariables("LOGON_USER")

  if InStr(UserName,"\")>0 then
    UserName = Right(UserName,Len(UserName) - InStr(UserName,"\"))
  end if

  Session("Username")=lcase(UserName)

to get the NT Username, although you need to make sure "anonymous access" is unchecked. To check this right-click the website in IIS, select "properties", select the "Directory Security" tab and in the "Anonymous Access and Authentication Control" box at the top click the "Edit" button.
0
 
ellandrdAuthor Commented:
>>to get the NT Username, although you need to make sure "anonymous access" is unchecked.

this be be done - we need this checked for other reasons so using auth_user wont work...
0
 
ellandrdAuthor Commented:
how do i use this DLL already created? you never said how i use it?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.