闁衡偓閹増顥� (0) +1 閻犙嶆嫹 (0) +1 闂婎亷鎷� (0) +1
闁衡偓閹増顥戦柟瀛樺姇婵拷闁哄被鍎冲﹢鍛村绩閹増顥�>>

正在阅读:VB学习:MX记录获取组件VB学习:MX记录获取组件

2004-03-10 09:52 出处:CSDN 作者:glling 责任编辑:linjixiong

  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)




察看评论详细内容 我要发表评论
作者笔名简短内容 发表时间
:

键盘也能翻页,试试“← →”键

相关文章

关注我们

最新资讯离线随时看 聊天吐槽赢奖品
闁归潧顑嗗┃鈧悹浣告健濡拷闁搞儳鍋涢崺灞俱亜閸洖鍔�