SetPortW: is not a member of FInternetAddr

So when i’m trying to cook project i get this error

IPv4Endpoint.h(110): error C2039: ‘SetPortW’: is not a member of ‘FInternetAddr’

Full text of errors. Win 64.

\Epic Games\UE_4.26\Engine\Source\Runtime\Networking\Public\Interfaces/IPv4/IPv4Endpoint.h(110): error C2039: ‘SetPortW’: is not a member of ‘FInternetAddr’
UATHelper: Packaging (Windows (64-bit)): D:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Sockets\Public\Sockets.h(8): note: see declaration of ‘FInternetAddr’
UATHelper: Packaging (Windows (64-bit)): D:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Networking\Public\Interfaces/IPv4/IPv4Endpoint.h(135): error C2039: ‘SetPortW’: is not a member of ‘FInternetAddr’
UATHelper: Packaging (Windows (64-bit)): D:\Program Files\Epic Games\UE_4.26\Engine\Source\Runtime\Sockets\Public\Sockets.h(8): note: see declaration of ‘FInternetAddr’

And I don’t even know why.
I think it’s something connected with modules enabled in project.
I don’t get it when compiling in debug editor.
I got it before, but it disappeared for some time and i don’t remember why.
I think it’s a bug of the engine.
I don’t even have any call to SetPort.
Cant find anything on the internet.
I don’t have “windows.h” included.

I had windows file included in another source file.
Moved them from .h to .cpp and error was gone.

Maybe you set the project type to ANSI (was Unicode)… because most unicode function in win32s ended with ‘w’ (hence setPortW - the ansi is setPortA but you just use setPort because there are #define which automatically switch to ***A or ***W.)