Re: DirectSoundEnumerate throwing an exception



On Aug 4, 2:45 pm, "Chris P." <m...@xxxxxxxxxxxx> wrote:
On Tue, 4 Aug 2009 00:50:02 -0700 (PDT), Nuno Centeio wrote:
Do you know where can I see the source code for DirectSoundEnumerate?

It never happened on my devel machine, so debugging is impossible :(

There's no source code available unfortunately.  You can trace through the
assembly code of InternalDirectSoundEnumerate() but that's about it.

You also might want to try my DirectSoundEnumerate sample to see if it
reproduces the same behavior.

--http://www.chrisnet.net/code.htm
[MS MVP for DirectShow / MediaFoundation]

I'm starting to wonder if it may be related with some problem when
passing managed to unmanaged...
The context that I pass for DirectSoundEnumerate is a managed Array.
I'm using GCHandle::Alloc but perhaps there is some kind of problem
with that. However, the context should only be used by the
DirectSoundEnumerate callback function and not inside the
DirectSoundEnumerate() function...

I really don't know :(

If I only could explain why from a second to another the functions
starts throwing exceptions :(

I'll take a look at your example. May be I'm missing something...

Thanks
.