|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
asp可以使用微软的activeX使得网页功能无比强大,不过安全性也较差,而且是基于的windows服务器,所以性能稳定性也一般*writtenbyJaron,2003-11-21*/
/*原出处:CSDN文档中央http://www.csdn.net/developWEB手艺中文网http://www.jaron.cn*/
/*转载请说明出处和保存此版权信息*/
/*接待利用SiteManager-CMSServer网站办理体系http://sitemanager.cnzone.net*/
/*检测MAC的组件(ActiveXDLL)源代码
/*在ASP中,经由过程自写组件的体例猎取服务器以后的网卡地点
OptionExplicit
PrivateConstNCBASTAT=&H33
PrivateConstNCBNAMSZ=16
PrivateConstHEAP_ZERO_MEMORY=&H8
PrivateConstHEAP_GENERATE_EXCEPTIONS=&H4
PrivateConstNCBRESET=&H32
PrivateTypeNCB
ncb_commandAsByteInteger
ncb_retcodeAsByteInteger
ncb_lsnAsByteInteger
ncb_numAsByteInteger
ncb_bufferAsLongString
ncb_lengthAsInteger
ncb_callnameAsString*NCBNAMSZ
ncb_nameAsString*NCBNAMSZ
ncb_rtoAsByteInteger
ncb_stoAsByteInteger
ncb_postAsLong
ncb_lana_numAsByteInteger
ncb_cmd_cpltAsByteInteger
ncb_reserve(9)AsByteReserved,mustbe0
ncb_eventAsLong
EndType
PrivateTypeADAPTER_STATUS
adapter_address(5)AsByteAsString*6
rev_majorAsByteInteger
reserved0AsByteInteger
adapter_typeAsByteInteger
rev_minorAsByteInteger
durationAsInteger
frmr_recvAsInteger
frmr_xmitAsInteger
iframe_recv_errAsInteger
xmit_abortsAsInteger
xmit_successAsLong
recv_successAsLong
iframe_xmit_errAsInteger
recv_buff_unavailAsInteger
t1_timeoutsAsInteger
ti_timeoutsAsInteger
Reserved1AsLong
free_ncbsAsInteger
max_cfg_ncbsAsInteger
max_ncbsAsInteger
xmit_buf_unavailAsInteger
max_dgram_sizeAsInteger
pending_sessAsInteger
max_cfg_sessAsInteger
max_sessAsInteger
max_sess_pkt_sizeAsInteger
name_countAsInteger
EndType
PrivateTypeNAME_BUFFER
nameAsString*NCBNAMSZ
name_numAsInteger
name_flagsAsInteger
EndType
PrivateTypeASTAT
adaptAsADAPTER_STATUS
NameBuff(30)AsNAME_BUFFER
EndType
PrivateDeclareFunctionNetbiosLib"netapi32.dll"_
(pncbAsNCB)AsByte
PrivateDeclareSubCopyMemoryLib"kernel32"Alias"RtlMoveMemory"(_
hpvDestAsAny,ByValhpvSourceAsLong,ByValcbCopyAsLong)
PrivateDeclareFunctionGetProcessHeapLib"kernel32"()AsLong
PrivateDeclareFunctionHeapAllocLib"kernel32"_
(ByValhHeapAsLong,ByValdwFlagsAsLong,_
ByValdwBytesAsLong)AsLong
PrivateDeclareFunctionHeapFreeLib"kernel32"(ByValhHeapAsLong,_
ByValdwFlagsAsLong,lpMemAsAny)AsLong
PublicFunctionGetMACAddress(sIPAsString)AsString
DimsRtnAsString
DimmyNcbAsNCB
DimbRetAsByte
DimaIP()AsString
DimxAsLong
DimnIPAsString
IfInStr(sIP,".")=0Then
GetMACAddress="有效的IP地点."
ExitFunction
EndIf
aIP=Split(sIP,".",-1,vbTextCompare)
IfUBound(aIP())3Then
GetMACAddress="有效的IP地点."
ExitFunction
EndIf
Forx=0ToUBound(aIP())
IfLen(aIP(x))>3Then
GetMACAddress="有效的IP地点"
ExitFunction
EndIf
IfIsNumeric(aIP(x))=FalseThen
GetMACAddress="有效的IP地点"
ExitFunction
EndIf
IfInStr(aIP(x),",")0Then
GetMACAddress="有效的IP地点"
ExitFunction
EndIf
IfCLng(aIP(x))>255Then
GetMACAddress="有效的IP地点"
ExitFunction
EndIf
IfnIP=""Then
nIP=String(3-Len(aIP(x)),"0")&aIP(x)
Else
nIP=nIP&".&qu</p>asp可以轻松地实现对页面内容的动态控制,根据不同的浏览者,显示不同的页面内容。而浏览者一点觉察不出来,就像为他专门制作的页面一样。使用各种各样的组件,asp可以完成无比强大的功能。 |
|