dsound: Runtime link to advapi32 RegDeleteTree

Reece Dunn msclrhd at googlemail.com
Sat Sep 1 17:37:39 CDT 2007

Correct me if I am wrong on this, but I have a few questions. And I
apologise if I ask some stupid questions, as I don't understand how
the Wine loader works.

On 01/09/07, Maarten Lankhorst <m.b.lankhorst at gmail.com> wrote:
> Makes the dsound dll work in windows xp and older versions of windows
> again.

By this, do you mean running the Wine dsound.dll on _native_ Windows?

> It is the least of all evils as far as I could see. It's either
> this or adding RegDeleteTree to libwine, unless someone has a third option.

If the intent is to get this working on native, adding RegDeleteTree
to libwine will not help. Unless you mean running Wine in Windows XP
or earlier compatibility mode? If so, I was under the assumption that
all the API were available to Wine, it was just the reported OS
version that differed. I say this, because none of the Windows headers
vary on OS version like the Windows SDK does.

Even so, since the RegDeleteTree API are queried for by
GetProcAddress, this means that they will not be found on WinXP and
earlier, so DllUnregisterServer will fail on those platforms, leaving
behind the dsound GUIDs on those platforms. This is bad practice, but
I don't see how else this will work (assuming that these are run on

> +static typeof(RegDeleteTreeW) * pRegDeleteTreeW;

Is it common practice in Wine to use typeof? I was under the
assumption that this was limited to the gcc C++ compiler. Even if it
is available in the C compiler, it is not portable to compilers that
don't support that, such as pre-typeof gcc compilers.

- Reece

More information about the wine-devel mailing list