explanation
Im calling a method of a COM object that takes a sized string as a parameter and fills it with the adapternames on the computer.
VB Code:
'dim sized string Dim AdapterNames as String * 1000 Dim AdapterList as String 'call the method to fill the string vpacket.GetAdapterNames(AdapterNames) AdapterList=Split(AdapterNames,vbNullChar)
This works fine and I get a Array of Strings with the adapter names.
But, Im not sure how to go about doing the same thing in vbs
heres what i was trying.
VB Code:
Dim AdapterNames set vpacket=createobject("vbPcap.vbPacket") AdapterNames=string(1000," ") vpacket.GetAdapterNames(AdapterNames)
The AdapterNames doesnt get filled with the data like in vb.
Actually it doesnt get changed at all.
Am i trying something that cant be done in vbs?
Can someone point me in the right direction here.
thanks
packetvb




Reply With Quote