> So how do i find out, why HeapAlloc does not return sane values like > in first call of DirectSoundDevice_Create()? Sounds like heap corruption. Try using valgrind to see if there are memory errors before the second call to DirectSoundDevice_Create(). --Juan