Forum Discussion
OTS02
Feb 05, 2009Cirrus
Here is the latest thing I've tried:
Private Sub WatchCurCons(ByVal pool_name As String, ByVal member_ip As String, ByVal member_port As Long)
Dim interfaces As iControl.Interfaces = New iControl.Interfaces
interfaces.initialize(activeunit, "admin", pword) 'change before publishing
Dim pool_names(0) As String
Dim statslist As System.Array
'Dim curcons
Dim memdef()() As iControl.CommonIPPortDefinition = _
New iControl.CommonIPPortDefinition(0)() {}
Dim MemberStatisticsA As iControl.LocalLBPoolMember
memdef(0)(0) = New iControl.CommonIPPortDefinition
memdef(0)(0).address = member_ip
memdef(0)(0).port = member_port
pool_names(0) = pool_name
statslist = MemberStatisticsA.get_statistics(pool_names, memdef)
End Sub
the error is:
memdef (0) (0) = NEW iControl.CommonIPPortDefinition
Object reference not set to an instance of an object.
troubleshootin tips:
Use "new" keywork to create an object instance.
Check to determine if the object is null before calling the method.
I thought that was what I was doing with "memdef(0)(0) = New iControl.CommonIPPortDefinition"
I may not have the background needed to do this kind of thing. I'm but a simple network dude.