End If ' Move to next char iNdx = iNdx + 1 ' While we should still be reading chars While (iChCount) ' add the char to our string sName = sName + Chr(dnsReply(iNdx)) iChCount = iChCount - 1 iNdx = iNdx + 1 Wend ' If the next char isn't null then the string continues, so add the dot If (dnsReply(iNdx) <> 0) Then sName = sName + "." Wend End Sub Private Function GetMXName(dnsReply() As Byte, iNdx As Integer, iAnCount As Integer) As String Dim iChCount As Integer ' Character counter Dim sTemp As String ' Holds original query string Dim iMXLen As Integer Dim iBestPref As Integer ' Holds the "best" preference number (lowest) Dim sBestMX As String ' Holds the "best" MX record (the one with the lowest preference) iBestPref = -1 ParseName dnsReply(), iNdx, sTemp ' Step over null iNdx = iNdx + 2 ' Step over 6 bytes (not sure what the 6 bytes are, but all other ' documentation shows steping over these 6 bytes) iNdx = iNdx + 6 On Error Resume Next While (iAnCount) ' Check to make sure we received an MX record If (dnsReply(iNdx) = 15) Then Dim sName As String Dim iPref As Integer sName = "" ' Step over the last half of the integer that specifies the record type (1 byte) |
闁衡偓閹増顥戦柟瀛樺姇婵拷闁哄被鍎冲﹢鍛村绩閹増顥�>>
正在阅读:VB学习:MX记录获取组件VB学习:MX记录获取组件
2004-03-10 09:52
出处:CSDN
责任编辑:linjixiong
键盘也能翻页,试试“← →”键