IndySockets / Indy

Indy - Internet Direct
https://www.indyproject.org
461 stars 155 forks source link

TIdStackWindows.GetLocalAddressList() does not compile in GetLocalAddressesByAdaptersAddresses() #459

Open rlebeau opened 1 year ago

rlebeau commented 1 year ago

In TIdStackWindows.GetLocalAddressList(), this line in the local function GetLocalAddressesByAdaptersAddresses():

if UnicastAddr^.DadState = IpDadStatePreferred then

must be changed to the following to make it compile:

if UnicastAddr^.DadState = IP_DAD_STATE.IpDadStatePreferred then
rlebeau commented 1 year ago

@DavidUflx I've compiled this code before and it worked fine for me. What is the exact compiler error? What platform are you targeting, and which compiler options are you using?

The only reason you should ever need to qualify an enum value with its enum type name is if you are compiling with Scoped Enums enabled, which is OFF by default. The FMX library is compiled with it ON, but that does not affect Indy, otherwise you would be seeing a LOT more errors like this.