|
|
|
date: Wed, 26 Oct 2005 10:56:03 -0700,
group: microsoft.public.inetsdk.programming.scripting.vbscript
back
API help
Hi,
I'm new to VBScript, but not to VBA. I have the following code I use in VBA
to return the USER ID and Domain information from the Active Directory.
However, I have no idea where to put my api script on my web page. I know it
must be placed somewhere in the header... Can someone help me with the
Syntax? I need to capture the UserID and network domain name, and assign them
to variables in order to determine what url will open for the user based on
the data.
Many Thanks!
S. Skaar
DBA.
skaarwebconsulting@yahoo.com
Option Explicit
Private Declare Function apiGetComputerName Lib "kernel32" Alias _
"GetComputerNameA" (ByVal lpBuffer As String, nSize As Long) As Long
Function fOSMachineName() As String
'Returns the computername
Dim lngLen As Long, lngx As Long
Dim strCompName As String
lngLen = 16
strCompName = String$(lngLen, 0)
lngx = apiGetComputerName(strCompName, lngLen)
If lngx <> 0 Then
fOSMachineName = Left$(strCompName, lngLen)
Else
fOSMachineName = ""
End If
End Function
date: Wed, 26 Oct 2005 10:56:03 -0700
author: Sandy
|
|