APPHELP Functions

The table on this page lists all the functions that appear in the export directory of any known version of APPHELP.DLL. It gives for each function just brief summaries of the APPHELP versions that export the function and of the function’s status with respect to Microsoft’s documentation. This master list is the key to other lists. More detail on each function’s availability and documentation status may be found by looking for the function in other lists according to the function’s first version. In the Table of Contents, expand the entry for APPHELP Versions to get the pages for each version. More explanatory notes follow the table.

Function Applicable Versions Documentation Status
AllowPermLayer 5.1 and higher  
ApphelpCheckExe 5.1 and higher  
ApphelpCheckIME 5.1 and higher  
ApphelpCheckInstallShieldPackage 5.1 and higher  
ApphelpCheckModule 6.0 and higher  
ApphelpCheckMsiPackage 5.1 and higher  
ApphelpCheckRunApp 5.1 and higher  
ApphelpCheckRunAppEx 6.0 and higher  
ApphelpCheckShellObject 5.1 and higher documented
ApphelpCreateAppcompatData 6.0 and higher  
ApphelpDebugPrintf 6.2 to 6.3  
ApphelpFixMsiPackage 5.1 and higher  
ApphelpFixMsiPackageExe 5.1 and higher  
ApphelpFreeFileAttributes 5.1 and higher  
ApphelpGetFileAttributes 5.1 and higher  
ApphelpGetMsiProperties 6.1 and higher  
ApphelpGetNTVDMInfo 5.1 and higher  
ApphelpGetShimDebugLevel 5.2 from Windows Server 2003 SP1, and higher  
ApphelpIsPortMonAllowed 6.3 and higher  
ApphelpParseModuleData 6.1 and higher  
ApphelpQueryModuleData some 5.1, some 5.2, and higher;
5.1 from Windows XP SP2 and higher;
5.2 from Windows Server 2003 SP1 and higher
 
ApphelpQueryModuleDataEx 6.0 and higher  
ApphelpReleaseExe 5.2 only  
ApphelpShowDialog 5.1 and higher  
ApphelpShowUI 5.1 to 5.2  
ApphelpUpdateCacheEntry 5.1 and higher  
DWM8And16Bit_ChangeDisplaySettingsExW_CallOut 6.2 and higher (x86 only)  
DWM8And16Bit_DirectDrawCreateEx_CallOut 6.2 and higher (x86 only)  
DWM8And16Bit_DirectDrawCreate_CallOut 6.2 and higher (x86 only)  
DWM8And16Bit_EnumDisplaySettingsExW_CallOut 6.2 and higher (x86 only)  
DWM8And16Bit_IsShimApplied_CallOut 6.2 and higher (x86 only)  
DWM8And16Bit_RestoreDisplayMode_CallOut 6.2 and higher (x86 only)  
DeleteAppcompatModeW 5.1 before Windows XP SP1  
DlCreate (1) 6.2 to 6.3  
DlDebugPrintf (3) 6.2 to 6.3  
DlDebugSetListener (5) 6.2 to 6.3  
DlDebugVPrintf (4) 6.2 to 6.3  
DlDelete (2) 6.2 to 6.3  
DlEnumChannels 6.2 to 6.3  
DlGetFlagsMask (11) 6.2 to 6.3  
DlGetQuota (9) 6.2 to 6.3  
DlGetState (6) 6.2 to 6.3  
DlGetStateEx 6.2 to 6.3  
DlPrintf (17) 6.2 to 6.3  
DlSetFileName (14) 6.2 to 6.3  
DlSetFlags (8) 6.2 to 6.3  
DlSetFlagsEx 6.2 to 6.3  
DlSetFlagsMask (12) 6.2 to 6.3  
DlSetLevel (13) 6.2 to 6.3  
DlSetLevelEx 6.2 to 6.3  
DlSetQuota (10) 6.2 to 6.3  
DlSetState (7) 6.2 to 6.3  
DlSetStateEx 6.2 to 6.3  
DlSnapshot 6.2 to 6.3  
DlVPrintf (18) 6.2 to 6.3  
GetPermLayers 5.1 and higher  
PersistAppcompatModeW 5.1 before Windows XP SP1  
SE_AddHookset 6.2 and higher  
SE_CALLBACK_AddHook 6.2 and higher  
SE_CALLBACK_Lookup 6.2 and higher  
SE_COM_AddHook 6.2 and higher  
SE_COM_AddServer 6.2 and higher  
SE_COM_HookInterface 6.2 and higher  
SE_COM_HookObject 6.2 and higher  
SE_COM_Lookup 6.2 and higher  
SE_DllLoaded 6.1 and higher  
SE_DllUnloaded 6.1 and higher  
SE_DynamicShim 6.1 and higher  
SE_GetHookAPIs 6.1 and higher  
SE_GetMaxShimCount 6.1 and higher  
SE_GetProcAddressForCaller 6.2 and higher  
SE_GetProcAddressIgnoreIncExc 6.1 and higher  
SE_GetProcAddressLoad 6.1 and higher  
SE_GetShimCount 6.1 and higher  
SE_GetShimId 6.2 and higher  
SE_InitializeEngine 6.2 and higher  
SE_InstallAfterInit 6.1 and higher  
SE_InstallBeforeInit 6.1 and higher  
SE_IsShimDll 6.1 and higher  
SE_LdrEntryRemoved 6.1 and higher  
SE_LdrResolveDllName 6.2 and higher  
SE_LookupAddress 6.2 and higher  
SE_LookupCaller 6.2 and higher  
SE_ProcessDying 6.1 and higher  
SE_ShimDPF 6.2 and higher  
SE_ShimDllLoaded 6.2 and higher  
SE_WINRT_AddHook 6.2 and higher  
SE_WINRT_HookObject 6.2 and higher  
SdbAddLayerTagRefToQuery 6.0 and higher  
SdbActivateIndex (21) 6.2 and higher  
SdbApphelpNotify 6.0 and higher  
SdbApphelpNotifyEx 6.0 and higher  
SdbApphelpNotifyEx2 6.0 and higher  
SdbBeginWriteListTag 5.2 from Windows Server 2003 SP1, and higher documented
SdbBuildCompatEnvVariables 5.2 from Windows Server 2003 SP1, and higher  
SdbCloseApphelpInformation 5.1 and higher  
SdbCloseDatabase 5.1 and higher documented;
earlier in SDBAPIU
SdbCloseDatabaseRead   only in SDBAPIU
SdbCloseDatabaseWrite 5.2 from Windows Server 2003 SP1, and higher documented
SdbCloseLocalDatabase 5.2 from Windows Server 2003 SP1, and higher  
SdbCommitIndexes 5.2 from Windows Server 2003 SP1, and higher documented
SdbCreateDatabase 5.2 from Windows Server 2003 SP1, and higher documented
SdbCreateHelpCenterURL 5.2 from Windows Server 2003 SP1, and higher  
SdbCreateMsiTransformFile 5.1 and higher earlier in SDBAPIU
SdbDeactivateIndex (22) 6.2 and higher  
SdbDeclareIndex 5.2 from Windows Server 2003 SP1, and higher documented
SdbDeclareIndexEx (19) 6.2 and higher  
SdbDeletePermLayerKeys 5.1 and higher  
SdbDumpSearchPathPartCaches 6.0 and higher  
SdbEndWriteListTag 5.2 from Windows Server 2003 SP1, and higher documented
SdbEnumMsiTransforms 5.1 and higher earlier in SDBAPIU
SdbEscapeApphelpURL 5.2 from Windows Server 2003 SP1, and higher  
SdbFindCustomActionForPackage 5.2 from Windows Server 2003 SP1, and higher  
SdbFindFirstDWORDIndexedTag 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbFindFirstGUIDIndexedTag 5.2 from Windows Server 2003 SP1, and higher  
SdbFindFirstLayer (23) 6.2 and higher  
SdbFindFirstMsiPackage 5.1 and higher earlier in SDBAPIU
SdbFindFirstMsiPackage_Str 5.1 and higher earlier in SDBAPIU
SdbFindFirstNamedTag 5.1 and higher earlier in SDBAPIU
SdbFindFirstStringIndexedTag 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbFindFirstTag 5.1 and higher documented;
earlier in SDBAPIU
SdbFindFirstTagRef 5.1 and higher earlier in SDBAPIU
SdbFindMsiPackageByID 5.2 from Windows Server 2003 SP1, and higher  
SdbFindNextDWORDIndexedTag 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbFindNextGUIDIndexedTag 5.2 from Windows Server 2003 SP1, and higher  
SdbFindNextLayer (24) 6.2 and higher  
SdbFindNextMsiPackage 5.1 and higher earlier in SDBAPIU
SdbFindNextStringIndexedTag 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbFindNextTag 5.1 and higher documented;
earlier in SDBAPIU
SdbFindNextTagRef 5.1 and higher earlier in SDBAPIU
SdbFormatAttribute 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbFreeDatabaseInformation 5.2 from Windows Server 2003 SP1, and higher  
SdbFreeFileAttributes 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbFreeFileInfo 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbFreeFlagInfo 5.1 from Windows XP SP1, and higher  
SdbGUIDFromString 5.2 from Windows Server 2003 SP1, and higher  
SdbGUIDToString 5.2 from Windows Server 2003 SP1, and higher  
SdbGetAppCompatData (26) 6.2 only  
SdbGetAppCompatDataSize 5.2 from Windows Server 2003 SP1, and higher  
SdbGetAppPatchDir 5.2 from Windows Server 2003 SP1, and higher documented
SdbGetBinaryTagData 5.1 and higher documented;
earlier in SDBAPIU
SdbGetDatabaseGUID 5.2 from Windows Server 2003 SP1, and higher  
SdbGetDatabaseID 5.1 and higher  
SdbGetDatabaseInformation 5.2 from Windows Server 2003 SP1, and higher  
SdbGetDatabaseInformationByName 5.2 from Windows Server 2003 SP1, and higher  
SdbGetDatabaseMatch 5.1 and higher  
SdbGetDatabaseVersion 5.1 and higher earlier in SDBAPIU
SdbGetDllPath 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbGetEntryFlags 5.1 and higher earlier in SDBAPIU
SdbGetFileAttributes 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbGetFileImageType 6.0 and higher  
SdbGetFileImageTypeEx 6.0 and higher  
SdbGetFileInfo 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbGetFirstChild 5.1 and higher documented;
earlier in SDBAPIU
SdbGetImageType 5.2 from Windows Server 2003 SP1, and higher  
SdbGetIndex 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbGetItemFromItemRef 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbGetKnownSafeLayers (34) 10.0 and higher  
SdbGetLayerCommandLine (27 in 6.2, then 26) 6.2 and higher  
SdbGetLayerName 5.2 from Windows Server 2003 SP1, and higher  
SdbGetLayerOsVersionValue (25) 6.2 and higher  
SdbGetLayerTagRef 5.2 from Windows Server 2003 SP1, and higher  
SdbGetLocalPDB 5.2 from Windows Server 2003 SP1, and higher  
SdbGetMatchingExe 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbGetMsiPackageInformation 5.1 and higher  
SdbGetNamedLayer 5.2 from Windows Server 2003 SP1, and higher  
SdbGetNextChild 5.1 and higher documented;
earlier in SDBAPIU
SdbGetNthUserSdb 5.2 from Windows Server 2003 SP1, and higher  
SdbGetPDBFromGUID 5.2 from Windows Server 2003 SP1, and higher  
SdbGetPermLayerKeys 5.1 and higher  
SdbGetPermLayerPath (28) 6.2 and higher  
SdbGetShowDebugInfoOption 5.2 from Windows Server 2003 SP1, and higher  
SdbGetShowDebugInfoOptionValue 5.2 from Windows Server 2003 SP1, and higher  
SdbGetStandardDatabaseGUID 5.1 and higher  
SdbGetStringTagPtr 5.1 and higher documented;
earlier in SDBAPIU
SdbGetTagDataSize 5.1 and higher earlier in SDBAPIU
SdbGetTagFromTagID 5.1 and higher documented;
earlier in SDBAPIU
SdbGrabMatchingInfo 5.1 and higher earlier in SDBAPIU
SdbGrabMatchingInfoEx 5.1 and higher earlier in SDBAPIU
SdbImportApis   only in SDBAPIU
SdbInitDatabase 5.1 and higher documented;
earlier in SDBAPIU
SdbInitDatabaseEx 5.2 and higher  
SdbInitDatabaseInMemory (29 in 6.2, then 28) 6.2 and higher  
SdbIsExeTaggedForReinstallUpgrade (32 in 6.2, then 31) 6.2 and higher  
SdbIsNullGUID 5.2 from Windows Server 2003 SP1, and higher  
SdbIsStandardDatabase 6.0 and higher documented
SdbIsTagrefFromLocalDB 5.2 from Windows Server 2003 SP1, and higher  
SdbIsTagrefFromMainDB 5.2 from Windows Server 2003 SP1, and higher  
SdbLoadString 6.0 and higher  
SdbMakeIndexKeyFromString 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbMakeIndexKeyFromStringEx (20) 6.2 and higher  
SdbOpenApphelpDetailsDatabase 5.1 and higher documented
SdbOpenApphelpDetailsDatabaseSP some 5.1, some 5.2, and higher;
5.1 from Windows XP SP1 and higher;
5.2 from Windows Server 2003 SP1 and higher
 
SdbOpenApphelpInformation 5.1 and higher  
SdbOpenApphelpInformationByID 5.2 from Windows Server 2003 SP1, and higher  
SdbOpenApphelpResourceFile 6.0 and higher documented
SdbOpenDatabase 5.1 and higher documented;
earlier in SDBAPIU
SdbOpenDbFromGuid 6.1 and higher  
SdbOpenLocalDatabase 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbPackAppCompatData 5.2 from Windows Server 2003 SP1, and higher  
SdbQueryApphelpInformation 5.1 and higher  
SdbQueryBlockUpgrade 6.0 and higher  
SdbQueryContext 6.1 and higher  
SdbQueryData 5.1 and higher earlier in SDBAPIU
SdbQueryDataEx 5.1 and higher earlier in SDBAPIU
SdbQueryDataExTagID 5.2 from Windows Server 2003 SP1, and higher documented
SdbQueryFlagInfo 5.1 from Windows XP SP1, and higher  
SdbQueryFlagMask 5.2 from Windows Server 2003 SP1, and higher  
SdbQueryName 6.0 and higher  
SdbQueryReinstallUpgrade 6.1 and higher  
SdbReadApphelpData 5.2 from Windows Server 2003 SP1, and higher  
SdbReadApphelpDetailsData 5.2 from Windows Server 2003 SP1, and higher documented
SdbReadBYTETag 5.1 and higher earlier in SDBAPIU
SdbReadBYTETagRef 5.1 and higher earlier in SDBAPIU
SdbReadBinaryTag 5.1 and higher documented;
earlier in SDBAPIU
SdbReadDWORDTag 5.1 and higher documented;
earlier in SDBAPIU
SdbReadDWORDTagRef 5.1 and higher earlier in SDBAPIU
SdbReadEntryInformation 5.1 and higher earlier in SDBAPIU
SdbReadMsiTransformInfo 5.1 and higher earlier in SDBAPIU
SdbReadPatchBits 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbReadQWORDTag 5.1 and higher documented;
earlier in SDBAPIU
SdbReadQWORDTagRef 5.1 and higher earlier in SDBAPIU
SdbReadStringTag 5.1 and higher documented;
earlier in SDBAPIU
SdbReadStringTagRef 5.1 and higher earlier in SDBAPIU
SdbReadWORDTag 5.1 and higher earlier in SDBAPIU
SdbReadWORDTagRef 5.1 and higher earlier in SDBAPIU
SdbRegisterDatabase 5.1 and higher  
SdbRegisterDatabaseEx 5.1 from Windows XP SP1, and higher documented
SdbReleaseDatabase 5.1 and higher documented;
earlier in SDBAPIU
SdbReleaseMatchingExe 5.2 from Windows Server 2003 SP1, and higher documented;
earlier in SDBAPIU
SdbResolveDatabase 5.1 and higher  
SdbSetApphelpDebugParameters 5.2 from Windows Server 2003 SP1, and higher  
SdbSetEntryFlags 5.2 from Windows Server 2003 SP1, and higher earlier in SDBAPIU
SdbSetImageType 5.2 from Windows Server 2003 SP1, and higher  
SdbSetPermLayerKeys 5.1 and higher  
SdbSetPermLayerState (33 in 6.2, then 32) 6.2 and higher  
SdbSetPermLayerStateEx (34 in 6.2, then 33) 6.2 and higher  
SdbShowApphelpDialog 5.2 from Windows Server 2003 SP1, and higher  
SdbShowApphelpFromQuery 6.0 and higher  
SdbStartIndexing 5.2 from Windows Server 2003 SP1, and higher documented
SdbStopIndexing 5.2 from Windows Server 2003 SP1, and higher documented
SdbStringDuplicate 6.0 and higher  
SdbStringReplace 6.0 and higher  
SdbStringReplaceArray 6.0 and higher  
SdbTagExeForReinstallUpgrade (30 in 6.2, then 29) 6.2 and higher  
SdbTagIDToTagRef 5.1 and higher earlier in SDBAPIU
SdbTagRefToTagID 5.1 and higher documented;
earlier in SDBAPIU
SdbTagToString 5.1 and higher documented;
earlier in SDBAPIU
SdbUnloadImportLibs   only in SDBAPIU
SdbUnpackAppCompatData 5.2 from Windows Server 2003 SP1, and higher  
SdbUnpackQueryResult 10.0 and higher  
SdbUnregisterDatabase 5.1 and higher documented
SdbUntagExeForReinstallUpgrade (31 in 6.2, then 30) 6.2 and higher  
SdbWriteBYTETag 5.2 from Windows Server 2003 SP1, and higher  
SdbWriteBinaryTag 5.2 from Windows Server 2003 SP1, and higher documented
SdbWriteBinaryTagFromFile 5.2 from Windows Server 2003 SP1, and higher documented
SdbWriteDWORDTag 5.2 from Windows Server 2003 SP1, and higher documented
SdbWriteNULLTag 5.2 from Windows Server 2003 SP1, and higher documented
SdbWriteQWORDTag 5.2 from Windows Server 2003 SP1, and higher documented
SdbWriteStringRefTag 5.2 from Windows Server 2003 SP1, and higher  
SdbWriteStringTag 5.2 from Windows Server 2003 SP1, and higher documented
SdbWriteStringTagDirect 5.2 from Windows Server 2003 SP1, and higher  
SdbWriteWORDTag 5.2 from Windows Server 2003 SP1, and higher documented
SetPermLayerState 6.1 and higher  
SetPermLayerStateEx 6.2 and higher  
SetPermLayers 5.1 and higher  
ShimDbgPrint 5.2 from Windows Server 2003 SP1, and higher  
ShimDumpCache 5.1 and higher  
ShimFlushCache 5.1 and higher documented

Names

Function names are reproduced from the export directory of the APPHELP.DLL executable. All exports from APPHELP are by name, until version 6.2 (Windows 8) exports roughly 30 by ordinal only. The names of functions that are exported only by ordinal are inferred from symbol files that Microsoft publishes for customer support. For such functions, the ordinal is given in brackets after the name. Beware that some functions are shown with two ordinals.

Versions

The APPHELP versions shown for each function are inferred from a study of public releases only. My holdings are incomplete and I anyway have no time for (or interest in) examining pre-release builds or hotfixes. Of necessity then, the table makes what I hope are reasonable assumptions about likely continuity, especially to suppose that a function will exist in future versions or that a function exists in all released builds of a version if no counter-example is yet known. If you want more accurate or comprehensive information, try getting it from Microsoft.

Documentation Status

To describe the information that is publicly available from Microsoft about APPHELP.DLL as thin seems perfectly fair. This is not to say there can’t be good reason for the information to be so thin, just that it is conspicuously thin—and, yes, to suggest that this is very much Microsoft’s intention. No Software Development Kit (SDK) that I have on disc and which in turn has documentation that can be searched on disc has any documentation of any APPHELP function other than ApphelpCheckShellObject. Among the headers in these SDKs, only this one function has a C-language declaration. Something conspicuous about this declaration is that the header, appcompatapi.h, defines a macro, SDBAPI, for the calling convention of this one function. Apparently, there exists an API of SDB functions. A header, named shimdb.h, that is yet known only from a Windows Driver Kit (WDK) for Windows 10, has a #include for an sdbapi.h which the kit omits. Release of shimdb.h and its disclosure that an sdapi.h exists seem likely to be oversights: after all, shimdb.h cannot be compiled while the included sdbapi.h is missing. Most plausibly, this missing header is where Microsoft declares the exported APPHELP functions whose names begin with Sdb—at least the documented ones.

A significant minority of this API of SDB functions is indeed documented. Except for ApphelpCheckShellObject, however, all the functions that are marked above as documented seem to be documented only online, as with SdbBeginWriteListTag (which is here selected as the example only for being alphabetically first). Even as online-only documentation, it’s in a section of Archive Developer Notes as if the functions have historical interest only. Perhaps that’s all the interest they do have at Microsoft and should have to anyone else. Note in this context that where Microsoft provides an Application Compatibility Toolkit, it provides only ready-made tools that use the functionality, not headers and libraries that might help developers find innovatively different ways to use the functionality.

Such documentation as Microsoft does provide online has for all practical effect been frozen for a decade and may anyway have appeared only years after the functionality’s introduction. The functions that are documented are mostly concerned with SDB files. As the form in which Windows keeps its Application Compatibility Database, these files have been around since Windows 2000 SP3 and APPHELP itself dates from the original release of Windows XP in 2001. That the documentation was first made available as early as 2001 seems doubtful and may now be unknowable: the only date in the documentation as browsed now (in August 2016) is a copyright notice for 2016. The documentation certainly does cover functionality that was new for Windows Vista and some aspects of it (such as lists of tags that are defined for database items) are even complete for Windows Vista, but nothing that has been added to the APPHELP functionality since Windows Vista has made it to this documentation. If there have been updates to this documentation in the last ten years, even assuming the documentation was published contemporaneously with Windows Vista in 2006, they seem limited to a mechanical change of the style of annotations that Microsoft adds to function arguments to help its tools for static code analysis.

Pre-History

Though the late Windows 2000 service packs have SDB files, they have no APPHELP.DLL. The first exported functions for working with SDB files are found in an SDBAPIU.DLL. Except that SDBAPIU seems not to have been developed as a Windows component—see especially that its version numbering is not that of Windows—there seems to be very little reason not to regard SDBAPIU as an early APPHELP. The Microsoft Installer certainly does. Where its MSI.DLL, even as late as Windows 8, imports the SDB functions dynamically, it knows to look in SDBAPIU if not running on Windows XP or higher.

The functions that are notated above as “earlier in SDBAPIU” are exported by name from the SDBAPIU that is known from both Windows 2000 SP3 and SP4. The three SDBAPIU exports that were not taken over by APPHELP are included too, but notated “only in SDBAPIU”. The others did not all pass to APPHELP immediately: many are not exported from APPHELP until a substantial increase for the build of version 5.2 from Windows Server 2003 SP1.

A curiosity that is not yet resolved is that SDBAPIU has some sort of continued existence beyond what looks at first to have been its replacement by APPHELP. Though no SDBAPIU executable is known in Windows XP and higher, symbol files for one are contained in Microsoft’s packages of symbol files for Windows 7, Windows 8 and Windows 8.1.

Separate Existence

Many of the functions that APPHELP exports—and many internal routines, too—are not written specifically for APPHELP but are instead incorporated into APPHELP from a statically linked library. This library is nowadays named simply sdbapi.lib. Before Windows 10, however, the library was named differently when built for user mode and kernel mode: sdbapil.lib and sdbapint.lib, respectively.

Kernel Mode

The kernel-mode use was designed from the start, with Windows XP recognising a particular SDB file named DRVMAIN.SDB as listing drivers that are blocked from being loaded. The file is loaded into memory by the loader and interpreted by the kernel (the address and size having been passed in the LOADER_PARAMETER_EXTENSION, via what were then the newly introduced DrvDBImage and DrvDBSize members). Where these SDB functions are used by the kernel there is of course no hope of them being imported from the user-mode APPHELP. There is not a kernel-mode APPHELP to import from, either. They are internal routines and therefore not ordinarily the business of these lists in any mode. The historical interest, however, is hard to resist. More than a few functions that are eventually exported from APPHELP have an earlier history in the statically linked library. Where this history is particularly that the function exists also as an internal routine in the kernel, it is not shown in this page’s master list of APPHELP exports but may be followed among the Remarks in the separate lists of exports by version.

User Mode

Of the user-mode Windows components that need Application Compatibility functionality, surprisingly many get it not by importing from APPHELP but by having it in their own executable image via the statically linked library. Of course, it’s only to be expected that where some low-level DLL such as KERNEL32 wants to work with an SDB file it should have the code in its own binary rather than import from the relatively higher-level APPHELP. Why, though, something as seemingly high-level as GAMEUX.DLL for the Games Explorer carries code from the statically linked library instead of importing from APPHELP may be anyone’s guess.

Delay-Load Failure Hook

From the beginning, a selection of APPHELP exports are covered by the undocumented DelayLoadFailureHook function that has long been exported from KERNEL32 (in its version 5.0 and higher). This function is intended to extend the capability of the library code that Microsoft Visual Studio supplies (with source code) to support delay-loaded importing. The default behaviour of this library code is to throw an exception if the module to be imported from can’t be loaded or if the function that’s to be imported from that module isn’t exported by that module. The usual effect is to crash the program, if not completely brutally for lack of an exception handler then at least unpleasantly for it’s not as if a general-purpose exception handler can really do much about it. Programmers who don’t like to risk this from the default support can supply their own __delayLoadHelper2 routine, but a middle path is to extend the default by setting either or both of two pointers that are defined by the library but which are acted on only if they are not NULL when the library code is called to resolve a delay-loaded import. The DelayLoadFailureHook function is suitable for setting into the __pfnDliFailureHook2 pointer. It is acted on when the module to import is loaded but the function to import from it is not found. If the function is one of some thousands of Windows API functions, both well-known and not, from hundreds of DLLs, then the KERNEL32 implementation of DelayLoadFailureHook resolves the problem by returning the address of a stub that fails the function trivially. The importing module then gets to handle the failure of just the called function.

Even for the first release of APPHELP, DelayLoadFailureHook covers 11 APPHELP functions this way. Probably none were documented at the time. Hardly any have been documented since, and many more have been added to the coverage. This would not, of course, be the slightest bit remarkable were DelayLoadFailureHook exported only from KERNEL32 for use by other Windows components only. And it may be that the implementation in KERNEL32 is just for other Windows components. However, KERNEL32 gets the code and data for its DelayLoadFailureHook from a statically linked library, named dload.lib, which provides the same code and data for SHLWAPI to export DelayLoadFailureHook in its version 6.0 and higher (which, arguably confusingly, means Windows XP and higher). This SHLWAPI implementation is then imported (dynamically) by various components of Internet Explorer. For Windows Vista, a supposed separation of Internet Explorer from calling undocumented Windows API functions is handled by moving the same DelayLoadFailureHook to the new IERTUTIL and renaming it to IERT_DelayLoadFailureHook function. How Internet Explorer has this indirect knowledge of many undocumented APPHELP functions is not satisfactorily dismissed as being anyone’s guess. It ought instead to count to some regulator’s shame. The days were supposed to be long gone that Internet Explorer was written with any access to Windows functionality that Microsoft did not publish for use by competing browsers.

Again, the master list on this page cannot feasibly show the detail of which functions have delay-load support in which versions. For that, look through the separate lists of exports by version. It is not known what guides Microsoft’s choice.