Jump to content

ImportPatcher.41 - Find and fix dependency problems

Recommended Posts

Here's a quick summary of differences between GDR and QFE as I understand it:

GDR means General Distribution Release. They are released to the public on Windows Update and other places.

LDR/QFE updates ( Limited Distribution Release and Quick Fix Engineering ) are on another "branch" of development, and sometimes have to be requested. They usually are created to fix specific problems.

Think of it as "testing": you have the latest fixes, but also potentially new bugs or regressions.

When fixes of LDR/QFE are considered stable, they are merged in GDR branch. (the "stable" version )

The KB posted on Windows Update contains the two branches, so once you have installed LDR/QFE hotfixes, you're staying on this branch. (until the next service pack or if you uninstall any updates on LDR/QFE branch).

As far as which branch to use, it's really a matter of personal preference. Some prefer the GDR branch as there are fewer updates to integrate and they are slightly more stable, though they are not immune to issues. Others figure that all of the LDR/QFE updates will eventually be rolled into the GDR branch anyway, or the next SP if there ever is one, so you might as well be prepared. While there is a very small risk that new bugs are introduced, the cases where that has occurred are rare and they are usually corrected quickly with yet another update. LOL I personally have not run into a problem using the LDR/QFE branch.

Cheers and Regards

Edited by bphlpt
Link to post
Share on other sites

This is what Microsoft and MDGx uses, depending on the situation.

MS, that's for sure. MDGx , I don't think so... see this page. However it's true that the GDR branch is the safer one to use (and bphlpt's post two posts above this one explains in more detail what's involved).

@Drugwash: that's great news! I'll be testing it as soon as I manage to reboot into 98SE. Thanks a lot! :thumbup

Link to post
Share on other sites
This is what Microsoft and MDGx uses, depending on the situation.

MS, that's for sure. MDGx , I don't think so... see this page. However it's true that the GDR branch is the safer one to use.

If you notice I said depending on the situation. MDGx had some Unofficial hotfixes that was GDR. Not (ALL) but I know Microsoft hotfixes have both on most occasions. I guess its a toss up if you are specifically referring to Windows update or hotfixes. Windows update don't offer both versions but most hotfixes do. Edited by PROBLEMCHYLD
Link to post
Share on other sites

I was using import patcher to see if I could get Adobe Audition 1.5 to run. I ran Audition.exe through Importpatcher.37 and then ran the modified file (auditio#.exe) and got the error "Error loading language module". Looking at the import patcher logs, it seems that I'm missing apphelp.dll. I obtained that file and placed it in c:\windows, c:\windows\system, and c:\windows\system32, as well as the directory where I have import patcher (IP). I ran IP again, and this time it created apphel#.dll which I'm not sure what to do with. Auditio#.exe still gives me the same error.

Looking at auditio#.ini seems to indicate something is wrong with ntdll.dll (lots of entries ending in "=") and some entries for Kernel32.dll






So am I supposed to replace apphelp.dll with apphel#.dll?

What do I do with ipstub.dll?

Is there any hope of getting audition.exe (or auditio#.exe) to run? (yes I have KernelEx installed).

Link to post
Share on other sites

As I wrote in the other thread (the Audition 1.5 one), Audition 1.5 doesn't run under 9x. You will have however no problems running 1.0 which is essentially a repackaged CoolEdit Pro 2 and can be used under stock 9x/Me AFAIK. That's what I would suggest, find yourself Audition 1.0 or CoolEdit and use that.

Link to post
Share on other sites

> So am I supposed to replace apphelp.dll with apphel#.dll? ... What do I do with ipstub.dll?

Please reread post #4, then use ipstub.dll to replace the evil apphelp.dll

> Is there any hope of getting audition.exe (or auditio#.exe) to run? (yes I have KernelEx installed).

You might have better luck using Kexstubs, but you're probably best off taking loblo's advice.

Link to post
Share on other sites
  • 11 months later...

I've been using ImportPatcher.38 for a long time now, so it's about time I post it! :yes:

The key new feature is that Delay-load processing is now optional and defaults to OFF. For Kexstubs users, this is great for finding the minimal set of missing APIs that need to be added to stubs.ini (or Kstub822.ini).

New in ImportPatcher.38:

  • March 29, 2013
  • Delay-load processing made optional
  • Added file and data alignment checking
  • Ordinal import fields reversed in log (to match strings)

ImportPatcher.39 is a first attempt at moving towards a dialog interface. The initial MessageBox is replaced by a dialog box and the settings section of the #.ini file has been removed. (In fact, if there are no missing dependencies, the #.ini file will be empty!) The log file output remains the same.

New in ImportPatcher.39:

  • July 6, 2013
  • Expanded first MessageBox into fuller DialogBox
  • Added export forward patching
Edited by jumper
Link to post
Share on other sites
  • 11 months later...




  • Interactive gui with drag and drop
  • Checkboxes:

    [_] Start dependency search in local folder

    [_] Test by loading (KernelEx)

    [_] Process delay imports

    [_] Walk dependencies

    [_] Unbind broken bindings

    [_] Show APIs for missing DLLs

    [_] Target Win9x (Subsystem version 4.0)

    [_] Save settings as .ini file

    [_] Create detailed .log file

  • Buttons:

    [ Analyze only ]

    [ Patch ] [ Cancel ]

    Large editable results box

Still TBD:

- ordinal support

- local walk

- sub/folder processing

- unUPX

Link to post
Share on other sites

Minor graphical issues on a 98SE with Revolutions Pack and non-standard settings: screenshot


Testing with Firefox 10.0.12 and KernelEx 4.5.2 official I get no patches needed in the results window, however the FileInfo plug-in (Total Commander) shows GetProcessIoCounters missing from kernel32.dll.

Same missing API for Firefox 9.0.1 on the same system, however ImportPatcher40 does show it this time in the results window.

Both firefox executables are in 'Default' compatibility mode. But... v10 is UPXed, while v9 is not, therefore I'd say unUPX would be necessary.


If I may suggest a few improvements:

- temporarily disable 'Analyze only' and 'Patch' while processing a file

- show an 'Operation finished' notice somewhere for user's awareness

- option where to save the log file

- alphabetically sort APIs in log file, for each import

- a readme text file în the archive, for those that may have gotten it from third-parties and have no Internet access to read details in this forum (or for those who forgot what's it for)


Thank you for the new version! ;)

Link to post
Share on other sites
  • 4 weeks later...

The latest Gimp (2.8.4) has files with bogus internal build timestamps (1970, 2040, etc.). ImportPatcher.41 can now handle them.

The "...local folder" option now defaults to ON when ImportPatcher launches and retains any user changes throughout the session. (In IP.40 it was auto-reset to ON for EXEs and OFF for DLLs at each file load.)

WM_CTLCOLORSTATIC messages are now processed to (hopefully) prevent Revolutions Pack from "customizing" the background color of the controls:

    case WM_CTLCOLORSTATIC:      SetBkMode ((HDC)wParam, TRANSPARENT);      return (int)GetStockObject (LTGRAY_BRUSH);
In case that doesn't work, one of the controls was resized so it should look better anyway.

UPXing an app with standard parameters converts all dependencies but the first API of each DLL into delay-loads that can currently only be detected by profiling. In the case of FF10, GetProcessIoCounters is provided by kexbases so it's not a problem.

In addition to the cursor changing to an hourglass during processing, the Analyze and Patch buttons and large text area are now disabled (grayed) as well. All return to normal to signify when processing is done.

This is a very minor release, so major changes such as Ordinal support and better logging options will have to wait.

Also: Invalid timestamps and file alignments are detected and reported in the log (if enabled), but not reported in the ini file/text box. Older features "Link to patched copies" and "Unbind broken bindings" have not been tested recently and may not work!


Link to post
Share on other sites
  • 9 months later...

I've been playing with upgrading Mozilla and Qt apps with files from related apps. Some improvements to ImportPatcher.41 would be very helpful. :yes: So here's what's on the drawing board for ImportPatcher.42:

EncodePointer / DecodePointer support

For non-relocatable EXE's and DLL's, insert the needed four bytes of code somewhere and bind the import linkage to Kernel32.dll using our code address for these two functions. For relocatable DLL's, the relocation table will need two new entries (the bound address locations) added to it.

For portable apps that need to run with different versions of Kernel32.dll, binding isn't feasible so the functions need to be renamed (or changed to ordinals) and additional startup code is needed to patch on-the-fly. This could be done in-place if the Import Address Table is in an executable section of memory.

Binding / Unbinding support

Initially just for the first case above. Also, "Unbind broken bindings" last worked in v.39. This should be reviewed and fixed.

Msvcrt substitution

Add button to add/remove these [DLL replacements]

Msvcr80.dll is available (or can easily be patched) for Win9x. I've successfully used the 90 and 100 replacements several times.

Display basic PE info for current file

Link timestamp

Link version

Image version

Full version information in drop-down box

Link to post
Share on other sites

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
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...