Getting IP Address using UPnP InvokeAction not returning anything, help?

后端 未结 2 1850
野的像风
野的像风 2021-01-26 17:54

Basically, when i use vb.net or c#.net to do this, it works perfectly, but when i use vb6, it doesn\'t work, in my for loop where the relevant service in the relevant device is

相关标签:
2条回答
  • 2021-01-26 18:16

    The documentation you linked says xins and xouts should be an empty array on calling: you could try changing the definition to

    Dim xins() As Variant
    Dim xouts() As Variant
    

    If that doesn't work you could even try

    Dim xins As Variant
    Dim xouts As Variant
    
    0 讨论(0)
  • 2021-01-26 18:39

    This is pretty straightforward. Those parameters are meant to be Variants that contain an array with one element, index = 0.

    Dim xins As Variant, xouts As Variant
    :
    :
    ReDim xins(0), xouts(0)
    serv.InvokeAction "GetExternalIPAddress", xins, xouts
    MsgBox xouts(0)
    

    I've been using this for some time with no problems.

    0 讨论(0)
提交回复
热议问题