JDRenk 1 Posted July 5, 2022 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
Sherlock 663 Posted July 6, 2022 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
JDRenk 1 Posted July 6, 2022 It looks like XP doesn't support SetupDiGetDevicePropertyW. Any thoughts? Share this post Link to post
Lajos Juhász 295 Posted July 6, 2022 https://docs.microsoft.com/en-us/windows/win32/api/setupapi/nf-setupapi-setupdigetdevicepropertyw Minimum supported client Available in Windows Vista and later versions of Windows. Share this post Link to post
JDRenk 1 Posted July 7, 2022 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
David Heffernan 2354 Posted July 7, 2022 Why are you calling SetupDiGetDeviceProperty? Share this post Link to post
JDRenk 1 Posted July 7, 2022 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
David Heffernan 2354 Posted July 7, 2022 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!! 1 Share this post Link to post
Angus Robertson 577 Posted July 7, 2022 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
Remy Lebeau 1436 Posted July 7, 2022 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
Angus Robertson 577 Posted July 7, 2022 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
David Heffernan 2354 Posted July 7, 2022 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. 2 1 Share this post Link to post
rvk 44 Posted July 7, 2022 14 minutes ago, Angus Robertson said: TComPort is a commercial component, Commercial component? Not sure where you can buy that. https://sourceforge.net/projects/comport/ https://torry.net/authorsmore.php?id=1809 Or are there others that are commercial? Share this post Link to post
Angus Robertson 577 Posted July 7, 2022 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 1 Share this post Link to post
rvk 44 Posted July 7, 2022 (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 July 7, 2022 by rvk Share this post Link to post
JDRenk 1 Posted July 7, 2022 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
rvk 44 Posted July 7, 2022 (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++) Edited July 7, 2022 by rvk Share this post Link to post
DelphiUdIT 188 Posted July 7, 2022 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. 1 Share this post Link to post
DelphiUdIT 188 Posted July 7, 2022 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 Share this post Link to post
DelphiUdIT 188 Posted July 7, 2022 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 1 Share this post Link to post