1
votes

I'm using the new Delphi Tokyo 10.2.2 and, in my case, I use packages loaded at runtime.

Even making a simple example and requesting EXE to load only the RTL unit occurs a run-time error, only on the Windows XP operating system:

The procedure entry point inet_ntop could not be located in the dynamic link library WS2_32.dll.

Using Delphi Tokyo 10.2.1 the problem does not happen.

Any idea?

3
Delphi does not support targeting XP, and has not supported it for a long time. If you need to support XP, use an older version of Delphi that does support XP. More sensible would be to stop supporting XP. - David Heffernan
Having said that, I know that Emba planned not to intentionally stop executables working on xp. Perhaps this is unintentional. Submit an issue to QP. - David Heffernan
@Ken That's not strictly true. Those versions did not knowingly set out to block executables running on xp. Emba said that they wouldn't test on xp but that they wouldn't actively block executables running on xp. And I'm pretty sure that Berlin and previous Tokyo versions produced executables that did run on xp. - David Heffernan
@DavidHeffernan: That is strictly true - see Supported Target Platforms, which says Windows 7 (SP1) is the oldest Windows version supported. I didn't say actively blocked. I said does not support. - Ken White
@ken That part is fine I agree. In fact I even wrote a comment to say the exact same thing. But you said more. It's this line that I was commenting on: They depend on functionality that does not exist in XP. That's not true. - David Heffernan

3 Answers

1
votes

I have a new project proxy functions to all exported functions of original Windows XP's WS2_32.dll including inet_pton that was missing in Windows XP's WS2_32.dll.

It tricks the Windows XP application process to think that inet_pton is available and not prompting any errors.

Repository: https://github.com/ccy/WS2_32_XP

0
votes

inet_ntop() was added to Winsock in Windows Vista, it does not exist in XP.

Clearly, Embarcadero has added new code to the RTL in 10.2.2 that is calling inet_ntop() statically instead of dynamically. Code that did not exist in the RTL in 10.2.1. That is why the error is happening when loading 10.2.2's RTL package on XP.

There is nothing you can do about that. If you must run your app on XP, (which Embarcadero dropped support for way back in XE3), then you can't use the 10.2.2 RTL.

0
votes

All,

I was able to solve the problem by creating a package with all the necessary units embbed.

Then the executable and the other BPL (modules) referring to this single new package.

It worked again in win XP!

Thank you all for the support