WinDepends icon indicating copy to clipboard operation
WinDepends copied to clipboard

ApiSet configuration change works once, then requires restart

Open i486 opened this issue 11 months ago • 4 comments

Bug description WinDepends applies the first ApiSet configuration change at runtime, but ignores any subsequent ApiSet changes. After switching ApiSet versions a second time, rescanning continues to use the previously applied ApiSet until the application is restarted.

Can also be reproduced on Windows 10 with slightly different steps.

Steps to reproduce

  1. Launch WinDepends.
  2. Scan any executable or DLL that imports ApiSet DLLs.
  3. Open Configurations → ApiSets and select V6 ApiSets.
  4. Rescan the file (press F5). ✔ The file is analyzed correctly using V6 ApiSets.
  5. Open Configurations → ApiSets again and select V2, V4, or uncheck ApiSets entirely.
  6. Rescan the file (press F5). ❌ WinDepends still analyzes the file using V6 ApiSets instead of the newly selected option.

Expected behavior The newly selected ApiSet configuration should be applied immediately when rescanning.

Actual behavior The previously selected ApiSet remains in use until WinDepends is restarted.

Workaround Restart WinDepends after changing the ApiSet configuration.

Environment

  • Windows 7
  • Windows 10

i486 avatar Dec 20 '25 15:12 i486

This happens because values of previously resolved apiset entries are cached inside WinDepends for quick access. I'll let you know when this bug will be fixed.

hfiref0x avatar Dec 21 '25 02:12 hfiref0x

Check the latest commit https://github.com/hfiref0x/WinDepends/commit/380d695403575d47e1988cff1bd1f61f0ac94558. In order to use it you need to rebuild WinDepends.Core (server) and WinDepends itself (client).

hfiref0x avatar Dec 21 '25 03:12 hfiref0x

Runtime apiset schema switching working great now. Nice work! Thanks.

BTW: It looks like the WinDepends.Core.x64.exe process is lingering again. In WinDepends0329 till WinDepends1010, it was terminated along with the main process. This isn’t a big deal if it’s an intentional change, but I’m slightly concerned about potential conflicts when testing multiple versions of WinDepends in quick succession. Maybe options to specify seconds? Something like Default: 8 Second and 0 or Disabled to terminate together.

i486 avatar Dec 21 '25 09:12 i486

When there is no connection to WinDepends.Core it will terminate in 10 seconds. You can watch timeout ticks if you compile it in a "verbose" configuration where it shows data in its own console window. There should be no problem with multiple instances each server starts with it own port number passed from client app.

hfiref0x avatar Dec 21 '25 11:12 hfiref0x