|
|||
|
The ipenum.dll exports five functions:
1. OpenIPEnumHandle() this function returns a ip enumerating handle (integer) 2. CloseIPEnumHandle(handle) this function closes the opened handle, you must call this function after enumerating 3. GetIPCount() this function returns the count of the neighbors in the network. Integer. 4. GetIPName(index) this function returns the name of the specified neighbor in the network. String Pointer. 5. GetIPAdress(index) this function returns the ip address of the specified neighbor in the network. String Pointer Usage: 1. Define the functions in swfkit, see the ipenum sample in the forum 2. Open an enumerating handle var handle = openIPEnum(); //openIPEnum is the alais of the OpenIPEnumHandle function defined in swfkit A handle of 0 means that the network cannot be enumerated. This often happens in win9x 3. Get the count of the neighbor in the network var count = getIPCount(); 4. Print the name and address of each neighbor in the network Code:
for (var i = 0; i < cnt; i++)
{
***var hostname = Dll.getPointerStringValue(getIPName(handle, i));
***var address = Dll.getPointerStringValue(getIPAdress(handle, i));
***
***trace(hostname);
***trace(address);
}
5. Close the handle closeIPEnum(handle); |
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|