I've been trying to hook the GetSelectedItems function inside Shobjdl_core.h
virtual HRESULT STDMETHODCALLTYPE GetSelectedItems(
/* [out] */ __RPC__deref_out_opt IShellItemArray **ppsai) = 0;
Since it is a virtual function, I cannot compile the code.
HRESULT(WINAPI* TrueSleep)(IShellItemArray** ppsai) = GetSelectedItems;
// Detour function that replaces the Sleep API.
//
HRESULT WINAPI TimedSleep(IShellItemArray** ppsai)
{
return 0;
}
The error is:
Error C2065 'GetSelectedItems': undeclared identifier DllCreateFile
Is there an example for hooking of class instance methods?
Only link is this one.
Solution is: