Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

48 lines
938 B

  1. Call GetZones()
  2. Public Function GetZones()
  3. Dim oAppleTalk
  4. Dim sZones
  5. Dim s
  6. Dim count
  7. Set oAppleTalk = CreateObject("MSSAAppleTalk.AppleTalk")
  8. '
  9. ' Set current zone
  10. oAppleTalk.Zone("Foo") = "Peach"
  11. '
  12. ' Display current zone
  13. WScript.Echo "Current Zone: " + oAppleTalk.Zone("Foo")
  14. '
  15. ' Get list of zones
  16. sZones = oAppleTalk.GetZones("Foo")
  17. '
  18. ' Display the list of zones
  19. If ( IsArray(sZones) ) Then
  20. For count = 0 to CInt(UBound(sZones))
  21. s = CStr(sZones(count))
  22. Call SA_TraceOut("Zone " , CStr(count) + ": " + CStr(s))
  23. Next
  24. Else
  25. Call SA_TraceOut("GetZones", "sZones is not an array")
  26. Exit Function
  27. End If
  28. Set oAppleTalk = Nothing
  29. End Function
  30. Function SA_TraceOut(ByVal sFn, ByVal sMsg)
  31. WScript.Echo sFn + " " + sMsg
  32. End Function