Name problems with HTMLDocument, InternetExplorer and WebBrowser
Dan Hipschman
dsh at linux.ucla.edu
Mon Jul 31 19:30:10 CDT 2006
Hi all,
I'd like to submit a patch which makes widl output forward declarations
to the header file for coclass definitions. Currently this is done only
if the coclass has its own forward declaration. For example,
[ uuid(...) ] coclass Foo;
[ uuid(...) ] coclass Bar { ... };
Foo will get declared (via typedef) in the header but Bar will not. The
only problem is that when I fix widl it breaks the build in three places:
make[2]: Entering directory `/var/build/wine/dlls/mshtml'
In file included from conpoint.c:33:
mshtml_private.h:99: error: conflicting types for `HTMLDocument'
../../include/mshtml.h:26023: error: previous declaration of `HTMLDocument' was here
make[2]: Entering directory `/var/build/wine/dlls/shdocvw'
In file included from classinfo.c:26:
shdocvw.h:133: error: conflicting types for `WebBrowser'
../../include/exdisp.h:1907: error: previous declaration of `WebBrowser' was here
shdocvw.h:143: error: conflicting types for `InternetExplorer'
../../include/exdisp.h:1918: error: previous declaration of `InternetExplorer' was here
The problem is that the three names are declared coclasses in the IDL files
which generates code like this:
#ifndef __Foo_FWD_DEFINED__
#define __Foo_FWD_DEFINED__
typedef struct Foo Foo;
#endif /* defined __Foo_FWD_DEFINED__ */
and is included in the files shown above which redeclare the names like this:
typedef struct { ... } Foo;
There's actually an easy fix if we just change the latter declaration to
struct Foo { ... };
but I'm not sure this is not a kludge. Do the names really represent the same
types, or is a namespace collision?
Thanks,
Dan
More information about the wine-devel
mailing list