

SuitePro also has the new Microsoft Detours API hooking core enabled by default and it does not require any changes in the dependent code. Should any issues arise with the new core it is possible to enable legacy core by recompiling ToolkitPro with XTP_SKINFRAMEWORK_USE_LEGACY_API_HOOK macro enabled in project options and defining XTP_SKINFRAMEWORK_USE_LEGACY_API_HOOK either in the client application project properties or any place in StdAfx.h prior to XTToolkitPro.h inclusion.
MS DETOURS CODE
ToolkitPro implicationsĪs mentioned above, the new Microsoft Detours API hooking core is enabled by default in ToolkitPro 19.2, it does not require any changes in the existing code that depends on SkinFramework. Obviously intercepting API calls at the point of implementation using one hook is not only less error prone but also ensures hook avilalability for all API calls regardless their origin. The new approach of intercepting API calls: The legacy approach of intercepting API calls: The difference is easier to understand visually: While the legacy hooking core intercept functions at the point of invocation, the Detours hooks intercept the point of implementation. The difference between old and new hooking approaches is in the location of the hooking code. Starting from version 19.2 both ToolkitPro and SuitePro have a new API hook core that uses Microsoft Detours library for intercepting Win32 API calls.

It's been a long time issue with SkinFramework and reported by many users in many different use cases.

The way the legacy SkinFramework API hooking was initially implemented unforunately allowed some necessary API calls to be missed. Any missing API call may result in undefined behavior, broken user interface or absence of skinning coverage. This approach relies on the fact that all necessary API calls without exceptions are intercepted and handled by SkinFramework. In its core SkinFramework intecepts Win32 API calls from the host application and performs either custom drawing logic or adjusts size parameters and return values so that the result of the subsequent call of an original Win32 function results in visual changes in UI required by the selected skin.
