4 ms·
> This simple and elegant solution would not have been possible with C++ Actually, it would, but not via any feature of the language. You can use features of t
by PaulDavisThe1st 6y ago
> This simple and elegant solution would not have been possible with C++
Actually, it would, but not via any feature of the language. You can use features of the linker to accomplish this (particularly LD_PRELOAD). It's not the same thing, really, but it felt worth mentioning for the record.
- neverartful 6y agoIn our case, the LD_PRELOAD approach would not have worked because this was on iOS devices where you can't set that variable. However, I do appreciate you mentioning it because it too is a powerful mechanism that enables some creative and non-invasive solutions in some cases.
- pjmlp 6y agoHere is how to do it in Windows. https://www.microsoft.com/en-us/research/project/detours/ https://www.microsoft.com/en-us/research/project/detours/ https://github.com/microsoft/Detours https://github.com/microsoft/Detours