⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 modutil.bas

📁 对NAT有详细的总结分析
💻 BAS
字号:
Attribute VB_Name = "modUtil"

'输出错误信息
Public Sub ErrorPrint(ByVal ErrValue As Long)
    Dim Msg As String
    
    ' This prints the various values
    Select Case ErrValue
    Case UPNP_E_ROOT_ELEMENT_EXPECTED
        MsgBox "Error: Root Element Expected"
    Case UPNP_E_DEVICE_ELEMENT_EXPECTED
        MsgBox "Error: Device Element Expected"
    Case UPNP_E_SERVICE_ELEMENT_EXPECTED
        MsgBox "Error: Service Element Expected"
    Case UPNP_E_SERVICE_NODE_INCOMPLETE
        MsgBox "Error: Service Node incomplete"
    Case UPNP_E_DEVICE_NODE_INCOMPLETE
        MsgBox "Error: Device node incomplete"
    Case UPNP_E_ICON_ELEMENT_EXPECTED
        MsgBox "Error: Icon element expected"
    Case UPNP_E_ICON_NODE_INCOMPLETE
        MsgBox "Error: Icon node incomplete"
    Case UPNP_E_INVALID_ACTION
        MsgBox "Error: Invalid action"
    Case UPNP_E_INVALID_ARGUMENTS
        MsgBox "Error: Invalid arguments"
    Case UPNP_E_OUT_OF_SYNC
        MsgBox "Error: Service Out of sync"
    Case UPNP_E_ACTION_REQUEST_FAILED
        MsgBox "Error: Action Request Failed"
    Case UPNP_E_TRANSPORT_ERROR
        MsgBox "Error: Transport Error "
    Case UPNP_E_VARIABLE_VALUE_UNKNOWN
        MsgBox "Error: Variable Value Unknown"
    Case UPNP_E_INVALID_VARIABLE
        MsgBox "Error: Invalid Variable"
    Case UPNP_E_DEVICE_ERROR
        MsgBox "Error: Device Error"
    Case UPNP_E_PROTOCOL_ERROR
        MsgBox "Error: Protocol Error"
    Case UPNP_E_ERROR_PROCESSING_RESPONSE
        MsgBox "Error: Error processing response"
    Case UPNP_E_DEVICE_TIMEOUT
        MsgBox "Error: Device Timeout"
    Case UPNP_E_DEVICE_SPECIFIC_ERROR
        MsgBox "Error: Device specific error"
    Case UPNP_E_INVALID_DOCUMENT
        MsgBox "Error: Invalid Document"
    Case UPNP_E_EVENT_SUBSCRIPTION_FAILED
        MsgBox "Error: Event Subscription failed"
    Case UPNP_E_UPNP_NOT_INSTALLED:
        MsgBox "Error: Can't create ActiveX component" + vbCrLf + "        Probably UPnP is not installed"
    Case Else
       Msg = "Error &H" & Hex(Err.Number) & " was generated by " _
             & Err.Source & Chr(13) & Err.Description
       MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext
    End Select
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -