Hi,
Yes I've been having this problem too, try using the following change to the DHCP_SEARCH_INFO struct.
It's not complete (i.e. I've dropped the other union members) but this will return the results correctly on 64bit platforms however then doesn't work on 32bit platforms.
Perhaps the ClientIpAddress property is actually a pointer (hence why it changes with the platform?)
I'll see if I can solve this properly...
///<summary>
/// The DHCP_SEARCH_INFO structure defines the DHCP client record data used to search against for particular server operations.
///</summary>
///<remarks>http://msdn.microsoft.com/en-us/library/windows/desktop/aa363370(v=vs.85).aspx</remarks>
[StructLayout(LayoutKind.Sequential)]
private struct DHCP_SEARCH_INFO
{
///<summary>
/// Search type (IP, MAC, or Hostname)
///</summary>
public DHCP_SEARCH_INFO_TYPE SearchType;
///<summary>
/// The IP address
///</summary>
public ulong ClientIpAddress;
}
Thanks,
Dave
http://www.centrel-solutions.com/xiaconfiguration