LEMON Manuals: Even more car manuals for everyone: 1960-2025
Home >> Mercedes Benz >> 2024 >> Sprinter 3500XD Van Cargo, 4WD >> Repair and Diagnosis >> TMC Recommended Practices >> Onboard Vehicle Electronics >> RP 1215 - Software Compatibility Guidelines >> RP 1215 - Software Compatibility Guidelines >> Application Install/Uninstall >> REFCOUNT Management
April 5, 2026: LEMON Manuals is launched! Read the announcement.

REFCOUNT Management

The application installer should manage the reference counting and version checking of shared components. This should be done under the following Windows Registry key:

HKEY_LOCAL_MACHINE
SOFTWARE
Microsoft
Windows
CurrentVersion
Shared DLLs

The Refcount for a SharedDLL should be managed to ensure that an uninstaller does not delete a shared file if an application using that component still exists on the system. Therefore, if the application installer finds that the shared component already exists and is registered, the installer should increment the SharedDLL count by only the number of components in this application that use the shared component. However, if the application installer finds that the shared component already exists but is not registered, the SharedDLL count should be incremented by 1 plus the number of components in the application that use this component. This procedure will ensure that when the vendor application is uninstalled, it will leave the shared file on the system with a Refcount of 1.

The application uninstaller should accurately decrement the count on all the components the application uses that are installed as shared components. TMC recommends that the uninstall application provide the user with the option to delete shared components whose Refcount reaches zero.