Jump to content
Silver Black

Delphi 10.3 Rio: Impossible to find entry point "GetProductInfo" under WinXP

Recommended Posts

Operating system: Windows 10.

Application, compiled with D2010: no problem even under WinXP.

Same applicatione compiled with D10.3-Rio: under WinXP error like "Impossible to find entry point GetProductInfo of procedure into dynamic link library kernel32.dll"

 

I do not use that API "GetProductInfo" call in my code at all! So what's that? In my all life every executable compiled with Delphi could run on every Windows version (from Win2000 or above at least).

Please help with some info! Thank you in advance.

Share this post


Link to post
1 hour ago, Schokohase said:

With Delphi 10.3 Rio you can not build applications for Windows XP.

 

Gosh! That really amaze me... I couldn't imagine. So WinXP is no more supported. Quite a shame.

Thank you for the quick reply to both of you.

Share this post


Link to post
13 minutes ago, Silver Black said:

 

Gosh! That really amaze me... I couldn't imagine. So WinXP is no more supported. Quite a shame.

Thank you for the quick reply to both of you.

It hasn't been supported for years now. Use an old delphi version for legacy OS like XP. 

Share this post


Link to post

Maybe this can help (not tested):

Copy Winapi.Windows.pas to the project source directory and comment out lines 8498-8501 and 38322 (or wherever GetProductInfo  is defined/declared), then recompile the project.

Probably just adding 'delayed' could help, too, like this:

function GetProductInfo; external kernel32 name 'GetProductInfo' delayed;

Try it, at least a negative result could be useful. I could not locate any other file in the source directory where GetProductInfo is called.

Edited by Alexander Elagin
Line nunmers fixed

Share this post


Link to post

That's unlikely to work, because many other units use the Windows unit, so the compiler will complain because it is newer than the one these units were compiled with. But I'll give it a try once I'm back at a computer with Delphi 10.3

Share this post


Link to post
3 hours ago, Alexander Elagin said:

Maybe this can help (not tested):

Copy Winapi.Windows.pas to the project source directory and comment out lines 8498-8501 and 38322 (or wherever GetProductInfo  is defined/declared), then recompile the project.

Probably just adding 'delayed' could help, too, like this:


function GetProductInfo; external kernel32 name 'GetProductInfo' delayed;

Try it, at least a negative result could be useful. I could not locate any other file in the source directory where GetProductInfo is called.

I'll try that straight now and I'll let you know. Just wait some minutes…
Weird thing is that another app I made (much more simpler and smaller) runs flawlessly on WinXP too.

Share this post


Link to post
7 hours ago, Alexander Elagin said:

Maybe this can help (not tested):

Probably just adding 'delayed' could help, too, like this:

The directive "delayed" worked perfectly!!! Great tip, thank you so much!

Share this post


Link to post

I updated a old Delphi 7 program to a Delphi Tokyo (10.2), and can be executed in XP, some problems with delphi vcl styles, but it can run.

Share this post


Link to post
3 hours ago, Alberto Fornés said:

I updated a old Delphi 7 program to a Delphi Tokyo (10.2), and can be executed in XP, some problems with delphi vcl styles, but it can run.

I'm speaking about Delphi 10.3 Rio. Some other smaller projects run too, but I had problem with one my biggest with that entry point, fixed with the "delayed" directive. Odd, because the other smaller projects (that didn't need the fix) had the Windows unit referred too.

Share this post


Link to post
14 hours ago, Silver Black said:

I'm speaking about Delphi 10.3 Rio. Some other smaller projects run too, but I had problem with one my biggest with that entry point, fixed with the "delayed" directive. Odd, because the other smaller projects (that didn't need the fix) had the Windows unit referred too.

I knew you need to compile the project with Delphi 10.3, I just wanted to point out that with the previous version it seems to work. The truth is that it is a problem, although support for Microsoft has been withdrawn for years, there are still many customers with XP computers.

Edited by Alberto Fornés

Share this post


Link to post
11 hours ago, Silver Black said:

I'm speaking about Delphi 10.3 Rio. Some other smaller projects run too, but I had problem with one my biggest with that entry point, fixed with the "delayed" directive. Odd, because the other smaller projects (that didn't need the fix) had the Windows unit referred too.

This is probably caused by smart linking. In smaller projects you do not use classes, that can call GetProductInfo, that is why they have been eliminated entirely. And once no one references GetProductInfo, it can be eliminated too.

  • Like 1

Share this post


Link to post
2 hours ago, Alberto Fornés said:

If I knew you need to compile the project with Delphi 10.3, I just wanted to point out that with the previous version it seems to work. The truth is that it is a problem, although support for Microsoft has been withdrawn for years, there are still many customers with XP computers.

Right, that's why I'd prefer to support WinXP in my software.

28 minutes ago, Микола Петрівський said:

This is probably caused by smart linking. In smaller projects you do not use classes, that can call GetProductInfo, that is why they have been eliminated entirely. And once no one references GetProductInfo, it can be eliminated too.

Nice to know there is a rational explanation for this, thank you!

Share this post


Link to post

I asked this question this afternoon in a Embarcadero Webminar and received this answer

Quote

XP isn't officially supported with Rio because some components take advantage of APIs that are not supported on XP. If you don't use these components or libraries then you can still target XP, but your milage may varry. So if you just take an existing program and compile it with Rio it should still work on XP, but if you add some new Windows 10 components without checking OS version then you will run into trouble.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×