I've tried hook COM Interface method and succeed.
That method is IDropTargetHelper::Drop.
But When I call Original Method, it's crashed like below code.
Error message is...
" Run-Time Check Failure #0 - The value of ESP was not properly saved across a function call. This is usually a result of calling a function declared with one calling convention with a function pointer declared with a different calling convention. "
So, I'd check calling convention and there is no problem.. i think. don't you?
Here is my code.
Code: Select all
HRESULT (WINAPI *DropNext)(
IDataObject* pDataObject,
POINT* ppt,
DWORD dwEffect
);
HRESULT WINAPI DropCallback (
IDataObject* pDataObject,
POINT* ppt,
DWORD dwEffect
)
{
return DropNext(pDataObject, ppt, dwEffect);
}