Strange exception

I can’t remember getting this exception before… I have installed iTunes and I have uninstalled BoundsChecker. Maybe it has something to do with that, although I don’t get the exception in other apps.

This line if (pDataObject->GetData (&format, &medium) == S_OK)
in juce_win32_Windowing.cpp causes an exception as soon as I try to drag a file from my Desktop over my JUCE app. The exception is “0x000006b5 The interface is unknown”.

Funnily enough, this does not happen in the JUCE demo app, but only in my app.

[Edit: Wrong, it actually does happen in all JUCE apps on XP64, but on XP I don’t get the exception in any JUCE app.]

It seems to be the object at the other end that’s causing the problem… I’ve no idea what could be happening there, sorry!

Change that line to these lines and see if it helps:

            void **result;
            if (pDataObject->QueryInterface (IID_IDataObject, &result) == S_OK
                && pDataObject->GetData (&format, &medium) == S_OK)

You probably meant:

void *result; if (pDataObject->QueryInterface (IID_IDataObject, &result) == S_OK && pDataObject->GetData (&format, &medium) == S_OK)
But no, it doesn’t help. Furthermore, the exception happens in ALL JUCE apps, including the JUCE Demo from the tip. It’s just that I had exceptions turned off in the other projects, but the exception actually still shows up in Visual Studio’s logger. I want to stress out that this is on XP64. On XP32 (my other machine), when you drag a file over the app, instead of producing and exception, the logger will show the following 2 lines:

Unloaded c:\windows\system32\winsta.dll Unloaded c:\windows\system32\netapi32.dll"
So, it seems as if on my XP64, something goes wrong there?
I’ve checked, and both DLLs are present on XP64, in both system dirs (system32 & SysWOW64).

Could it just be an internal exception inside a windows DLL? That might be just the way it’s supposed to work, and you’re only noticing it because the debugger is catching all exceptions, even the deliberate ones?

Yes, absolutely. The exception happens inside kernel32.dll and if I shut off the Win32 exceptions it’s all fine (apart from the error in the Logger nothing impairs the actual experience of the app). I was just wondering why this happens.

Oh! Dude…I thought you somehow got an IUnknown that snuck past Juce without supporting the IDataObject interface!