B
Blip
public class IP_ADAPTER_INFO //: IEnumerable<object> <-maybe
{
public IntPtr Next;
public uint ComboIndex;
public string AdapterName;
...etc...
public IP_ADAPTER_INFO(IntPtr baseAddress)
{
this.Next =
CustomMarshal.GetIntPtr(baseAddress, 0);
this.ComboIndex =
CustomMarshal.GetUInt32(baseAddress, 4);
this.AdapterName =
CustomMarshal.PtrToStringAscii(baseAddress, 8, 256);
...etc...
}
/*
private class IP_ADAPTER_INFO_Enumerator
{
private IP_ADAPTER_INFO IAO;
private int index;
public IP_ADAPTER_INFO_Enumerator(IP_ADAPTER_INFO IAO)
{
this.IAO = IAO;
index = -1;
}
//Increment index
public bool MoveNext()
{
index++;
if (index >= IAO.
}
}
*/
}
I started to try to make it enumerable , but can figure out what to
index on... never done this before. Is this the right path?
Thanks
{
public IntPtr Next;
public uint ComboIndex;
public string AdapterName;
...etc...
public IP_ADAPTER_INFO(IntPtr baseAddress)
{
this.Next =
CustomMarshal.GetIntPtr(baseAddress, 0);
this.ComboIndex =
CustomMarshal.GetUInt32(baseAddress, 4);
this.AdapterName =
CustomMarshal.PtrToStringAscii(baseAddress, 8, 256);
...etc...
}
/*
private class IP_ADAPTER_INFO_Enumerator
{
private IP_ADAPTER_INFO IAO;
private int index;
public IP_ADAPTER_INFO_Enumerator(IP_ADAPTER_INFO IAO)
{
this.IAO = IAO;
index = -1;
}
//Increment index
public bool MoveNext()
{
index++;
if (index >= IAO.
}
}
*/
}
I started to try to make it enumerable , but can figure out what to
index on... never done this before. Is this the right path?
Thanks