Correctly importing uuid

Jacek Caban jacek at codeweavers.com
Fri Feb 16 08:46:07 CST 2018


On 02/16/2018 12:27 PM, Stefan Dösinger wrote:
>
>> Am 16.02.2018 um 11:09 schrieb Jacek Caban <jacek at codeweavers.com
>> <mailto:jacek at codeweavers.com>>:
>>
>> In such cases we need to use the second way. Note that uuids are
>> usually defined using DEFINE_GUID in headers, see guiddef.h for the
>> macro. It expands to |extern const GUID| unless DEFINE_GUID is
>> defined. If it's defined, full declaration is included. In wmp_main.c
>> we include initguid.h, which defines DEFINE_GUID macro. It means that
>> we will have uuids declared for all headers included in wmp_main.c.
> Wouldn't it be possible to include public headers that have GUIDs from
> uuid.lib, then include initguid.h, and then include headers that
> define WMP guids (or define the WMP GUIDs manually)? That should
> import guids that work with uuid.lib from there and define the rest.
>
> Of course the beauty of a half-way approach is always questionable, so
> not sure if that's better than just using DEFINE_GUID for everything.


Sure, that would work as well. The downside is that then we depend on
includes hierarchy - if we ever need to change includes in headers, we
need to take that into account in non-intuitive places. It's not a big
deal, so I think the solution is fine.


Thanks,

Jacek

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20180216/a039f4f8/attachment.html>


More information about the wine-devel mailing list