Win32 headers: Problem with COM interface indirection levels
Michael Butscher
mbutscher at gmx.de
Thu Aug 9 05:11:50 PDT 2007
Carlos Santander wrote:
> Michael Butscher escribió:
[...]
> > Because of the different level of indirection e.g. the IShellFolder
> > interface in D is in fact equivalent to the LPSHELLFOLDER type in C++.
[...]
> I don't use Windows, but I haven't heard of anyone having this problem before.
This might be an indication that this part of the headers is currently
not used widely (maybe by some people changing their copy of the
headers privately). But the published version definitely can't work.
> Can you test that with a simpler case?
I have made a little test already. The provided headers lead to a
access violation. Modifying it according to my request make them work.
I found out in the meantime that some headers (namely "d3d9.d") were
modified already in a similar way, but it was not documented in the
translation instructions.
> Remember that there's a ComInterface (or
> something like that) in std.c.windows.com (I think) which gets special treatment
> by the compiler.
It seems that every interface named "IUnknown" (and derived interfaces)
is handled specially, regardless of the containing module. This is not
the problem.
> Maybe the compiler performs some magic there in order to get
> everything working fine.
>
> Also, maybe this question is better suited in the Bindings project Dsource forum?
You are right. I only found forums a bit impractical, but that's not a
good argument.
Michael
More information about the Digitalmars-d
mailing list