![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | dhcpobjs.dll: Problems accessing reservations in scopes larger than/24 (class C) Hi, I have a few VB Scripts I have put together in order to manage reservations on a Win2000 DHCP server, and I was pretty happy with the way they were working until I tried to manipulate a reservation in a scope that was larger than a /24 (class C) network. I can access the scope information fine e.g. (assuming a scope address of 192.168.8.0 on a /23 network, mask 255.255.254.0, with DHCP server address 192.168.1.1): Set dhcpsrvr = dhcpmgr.Servers.Connect("192.168.1.1") Set Scope= dhcpSrvr.Scopes("192.168.8.0") WScript.Echo Scope.Address WScript.Echo Scope.Name WScript.Echo Scope.StartAdress WScript.Echo Scope.EndAddress WScript.Echo Scope.Parent WScript.Echo Scope.Comment & vbCrLF dhcpmgr.Servers(1).Disconnect Returns all the requested information without any problem. If however I try to access an individual reservation within scope 192.168.8.0, say 192.168.9.32: Set dhcpsrvr = dhcpmgr.Servers.Connect("192.168.1.1") Set Reservation = dhcpSrvr.Scopes("192.168.8.0").Reservations("192.168.9.32") WScript.Echo Reservation.Address WScript.Echo Reservation.Name WScript.Echo Reservation.UniqueID WScript.Echo Reservation.Parent WScript.Echo Reservation.Comment & vbCrLF dhcpmgr.Servers(1).Disconnect The script fails with error: C:\>cscript //NoLogo getReservation.vbs C:\getReservation.vbs(21, 2) (null): More data is available. Where line 21 in the above script would be: Set Reservation = dhcpSrvr.Scopes("192.168.8.0").Reservations("192.168.9.32") If I changed the Scope and Reservation address in the script to refer to a scope of size /24 or smaller it works perfectly. Now I realise dhcpobjs.dll is sparsely documented and probably no longer appropriate, but other than this issue it works very well for the specific area we use it. Can anyone shed any light on this problem? Thanks in advance |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| When a class is both an inherited class of another, and alsoimplements an interface method | .NET General | |||
| Problems Accessing Web Folders | Vista networking & sharing | |||
| DHCP Scopes | Vista General | |||
| Problems with accessing this newsgroup | Vista performance & maintenance | |||
| Re: Problems accessing some webpages | Vista General | |||