|
' **********************************************************
' ADSI 接続
' **********************************************************
Function ADSIConnect()
strServer = document.all("Server").value
if strServer = "" then
strServer = "."
end if
strUser = document.all("User").value
strPassword = document.all("Password").value
' 接続
on error resume next
Set objNspace = GetObject("WinNT:")
Set objService = objNspace.OpenDSObject("WinNT://" & strServer, _
strUser, strPassword, &H1 )
if Err.Number <> 0 then
alert(Err.Description)
ADSIConnect = False
Set objNspace = Nothing
Exit Function
end if
Set objNspace = Nothing
on error goto 0
ADSIConnect = True
End Function
| |