[erlang-questions] : : Finding IP addresses in a PC
David Hopwood
david.nospam.hopwood@REDACTED
Wed Oct 4 18:12:57 CEST 2006
David Hopwood wrote:
> If you use GetAdaptersInfo, the string formatting is done for you in
> the IpAddress.String field:
>
> IP_ADAPTER_INFO dummy;
> DWORD len = 0;
> if (GetAdaptersInfo(&dummy, &len) != ERROR_BUFFER_OVERFLOW || len == 0) {
> return FAILED;
> }
>
> IP_ADAPTER_INFO pAdapters = (IP_ADAPTER_INFO *) malloc(len);
IP_ADAPTER_INFO *pAdapters = ...
--
David Hopwood <david.nospam.hopwood@REDACTED>
More information about the erlang-questions
mailing list