A step in the drag and drop process (or any other system call)

I have an application that does not use standard libraries. Instead, it uses stubs to call LoadLibrary / GetProcAddress, and then calls functions through the resulting function pointers.

Using the above method, my application calls DoDragDrop in ole32.dll. The call returns E_UNEXPECTED, which apparently means "crash".

What I want to ask is does anyone know how to find out what is going on inside the DoDragDrop call? In particular, can I find out which function or variable she is looking for, but cannot find? (I assume that he wants to access some function or variable that is not loading the moment I call DoDragDrop, and if I can explicitly load it, the call will succeed.) Obviously, I cannot enter the call - the attempt is simply runs the function and steps to the line in my code after calling DoDragDrop.

:)

(I am using VS2005 in XP.)

+3
source share
1 answer

I remember something like this happened when I forgot to call OleInitialize (Ex) / CoInitialize (Ex) for the thread making the call. Please note that the apartment must be STA.

0
source

Source: https://habr.com/ru/post/1791853/


All Articles