Jump to content
JDRenk

Windows XP App

Recommended Posts

I have created an App with Delphi 10.4 and Windows 10.  Will I be able to run the App on Windows XP??

Share this post


Link to post

Microsoft used to offer outdated OSes such as XP in virtual machines to test websites on different IE versions. Seems these VMs are gone though...you could try archive.org however.

Share this post


Link to post

It looks like XP doesn't support SetupDiGetDevicePropertyW.  Any thoughts?

Share this post


Link to post

The error is:

The procedure entry point SetupDiGetDevicePropertyW could not be located in the dynamic link library SetupAPI.dll

Share this post


Link to post

I don't have that answer.  I am using Delphi to create an App to log data through USB.  I am not an experienced programmer.

Share this post


Link to post

Then it sounds like the issue is with your USB library.  You'll need to dig into this, but my expectation is that the Delphi runtime won't call that function, so it's your code that does.  You'll be more experienced once you solve this!!

  • Like 1

Share this post


Link to post

What Delphi component are you using to log data, a serial port component? 

 

It's possible the Delphi component is calling SetupDiGetDeviceProperty , one of my serial port components uses SetupDiGetDeviceRegistryProperty from the Jedi library SetupApi.pas.  My Jedi version does not include SetupDiGetDeviceProperty, but it's possible a later version might.   You might be able to just remove it from the library unit.

 

Angus

 

Share this post


Link to post
On 7/6/2022 at 6:18 AM, JDRenk said:

It looks like XP doesn't support SetupDiGetDevicePropertyW.  Any thoughts?

Delphi does not call that function, so something in your project must be.  Depending on where that is, and how it is implemented, you might be able to enable delay-loading for it, and then use a hook to redirect it to a different function that is either a no-op or uses older APIs to simulate similar functionality.

Share this post


Link to post

TComPort is a commercial component, you should have the source code, so you can check if it uses SetupDiGetDeviceProperty and remove it and any other similar functions that XP does not support.

 

Angus

 

Share this post


Link to post

Wouldn't it just be better to stop using XP? Doesn't even sound like you have a machine to test on which is tough for a program based on USB devices. 

  • Like 2
  • Thanks 1

Share this post


Link to post

I guess there is more than one component called TComPort, I was referring to the Winsoft version, but that seems to be called ComPort. 

 

A quick search of TComPort does not find any setupdi functions.  Nor support for modern compilers.

 

Angus

  • Like 1

Share this post


Link to post
Posted (edited)
2 hours ago, Remy Lebeau said:

Delphi does not call that function, so something in your project must be.

I see that Delphi 10.2 has a call to SetupDiGetDevicePropertyW in System.Win.Bluetooth.

(in Embarcadero\Studio\19.0\source\rtl\net)

 

@JDRenk Are you also using System.Win.Bluetooth by any chance (specifically TWinBluetoothLEDevice)?

 

Edited by rvk

Share this post


Link to post

No, I'm not doing any Bluetooth.  But, I am using the Winsoft version ComPort.  How do I find out if that's calling it?

Share this post


Link to post
Posted (edited)

Do you have any (text-)search software. Like grep, notepad++, ScanFS or other?

You can search the complete source directory (all *.pas and *.inc) for SetupDiGetDevicePropertyW.

 

For example, I did:

C:\Program Files (x86)\Embarcadero\Studio\19.0\source>grep -d SetupDiGetDevicePropertyW  *.pas
rtl\net\System.Win.Bluetooth.pas
): BOOL; stdcall; external SetupApiModuleName name 'SetupDiGetDevicePropertyW' delayed;

C:\Program Files (x86)\Embarcadero\Studio\19.0\source>

(or as attached in notepad++)

1190410697_2022-07-0719_57_47-Window.thumb.png.2e5804fe1d275deea727356094a9b8b1.png

 

Edited by rvk

Share this post


Link to post

That function is called for example by the library used with FTDI USB to RS232 / RS485 peripherals. If someone has integrated FTDI peripheral functionality as a COM (serial) component that function may be called. But from what I know, the drivers for those devices no longer load in XP.
The serial devices of the FTDI are in very common use.

  • Like 1

Share this post


Link to post
11 minutes ago, rvk said:

Do you have any (text-)search software. Like grep, notepad++, ScanFS or other?

Of course, he MUST have "grep" ... he has Delphi 10.4 :classic_biggrin:

Share this post


Link to post

If you are FTDI chips in use you have only one way to work on XP: you must use the VCP drivers of FTDI (Virtual Com Port) that simulates the standard Windows com serial port.

 

The drivers should be signed with version prior 2.12.24 !!! You'll find the drivers for XP in this page: All VCP FTDI drivers version for all version of SO

 

Of course you can use the driver on XP if the FT4232 chip is supported .....

 

In your TCOMPort component use COMx, I mean the COM port listed in the device manager of windows.

 

Hope this help.

Bye

  • Like 1

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

×