cnpack/cnwizards — pull request #3 by vintagedave (2014-08-04 19:22:25+00:00)
Title: Changed TCnMethodHook to use DDetours. See issue https://github.com/cnpack/cnwizards/issues/2

Changed TCnMethodHook to use DDetours. See issue https://github.com/cnpack/cnwizards/issues/2
- Most places it's used are completely replaced (procedures HookMethod and UnhookMethod are now protected, so can't be called externally.) Note CnProjectExtWizard still hooks and unhooks - not ideal, should probably change code structure to hook once and call trampoline (original method) when necessary.
- DDetours code is current as of today, with XE3 compiler tweak by me (generics in the .pas file can cause compiler errors, even if the generics are never used - the compiler seeing them is enough.)

IMPORTANT NOTES: DDetours is added here - you may want to add it another way, such as directly from its Google Code page: https://code.google.com/p/delphi-detours-library/wiki/DDetours

Please see issue #2. This fixes compatibility with other IDE wizards which two or more try to hook the same IDE methods, allowing CnPack to be installed with other wizards at the same time.