GetInterfaceInfo function of win32 api

Benny saretbenny at gmail.com
Thu Jun 8 07:01:44 UTC 2023


On Thursday, 8 June 2023 at 06:22:08 UTC, Mike Parker wrote:
> On Thursday, 8 June 2023 at 05:52:43 UTC, Benny wrote:
>
>> ```
>> ```
>> app.obj : error LNK2019: unresolved external symbol 
>> GetInterfaceInfo referenced in function _Dmain
>> app.exe : fatal error LNK1120: 1 unresolved externals
>> Error: linker exited with status 1120
>> ```
>
> That's a linker error telling you that you aren't linking 
> anything that contains the symbol for `GetInterfaceInfo`. You 
> need to link `Iphlpapi.lib`.

I got something! thank you.
now I need to understand how can I get the properties of the 
GetInterfaceInfo

```
import core.sys.windows.iphlpapi;
import std.stdio;
import core.stdc.stdlib;

     void main()
     {
     	uint* i;
     	i = cast(uint*) malloc(10);
     	auto h = GetInterfaceInfo(null, i);
     	writefln("%s", h);
     	writeln("Hello, World!");
     }

```

this got me 122


More information about the Digitalmars-d-learn mailing list