I've tried to reproduce the issue you reported.
I'm having trouble to get "DoDragDrop" to get called at all when trying to drag slides in PowerPoint 2010 x64 on my Windows 8.1 x64 PC. The API gets called fine when dragging text, but not at all when dragging slides, it seems. That's different to your report. Even if I restart PowerPoint and then directly drag slides (without having dragged text first), "DoDragDrop" doesn't seem to be called at all.
Maybe I'm dragging slides in the wrong way? How do you do that? I just simply start with an empty project, then I copy the one and only slide, so I have 2 slides. Then I drag the first slide to the 2nd, so they swap their order. Do you use a different way of slide dragging?
FWIW, your code has one problem that I can see: You're repeatedly calling HookCode(), using the same "NextQueryContinueDrag" function variable, without properly unhooking the old hook before. That's not correct usage. Please try inserting the following code before your HookCode() call. Maybe that already "fixes" the issue?
- Code: Select all
if (NextQueryContinueDrag != NULL)
NextQueryContinueDrag = NULL;