这段代码用adsi,和vc怎么实现?
jenac 2003-04-07 05:47:36 <%
' Remember to enable Integrated Windows Authentication and
' disable Anonymous Access or you will get and Server 500 error.
Dim SecObj
Dim MyIPSec
' Get the IIS object that holds the info for the default site.
' This could be any site root/vdir, or IIS://LocalHost/W3SVC for global
' properties.
Set SecObj = GetObject("IIS://LocalHost/W3SVC/1/Root")
' Get the IIsIPSecurity object
Set MyIPSec = SecObj.IPSecurity
If (TRUE = MyIPSec.GrantByDefault) Then
Response.Write
"<BR>GrantByDefault was set to TRUE. Setting to FALSE.<BR>"
MyIPSec.GrantByDefault = FALSE
Else 'If (FALSE = MyIPSec.GrantByDefault) Then
Response.Write
"<BR>GrantByDefault was set to FALSE. Setting to TRUE.<BR>"
MyIPSec.GrantByDefault = TRUE
End If
' Set the info in the database
SecObj.IPSecurity = MyIPSec
SecObj.Setinfo
%>
这是一段配置IIS的代码,怎么用VC++来写呀?