Commit 90c7acf8 authored by Alexandre Julliard's avatar Alexandre Julliard

widl: Allow specifying a class version outside of a typelib too.

parent fc3114ca
......@@ -121,6 +121,7 @@ static int write_coclass( const type_t *class, const typelib_t *typelib )
const char *progid = get_attrp( class->attrs, ATTR_PROGID );
const char *vi_progid = get_attrp( class->attrs, ATTR_VIPROGID );
const char *threading = get_coclass_threading( class );
unsigned int version = get_attrv( class->attrs, ATTR_VERSION );
if (!uuid) return 0;
if (typelib && !threading) return 0;
......@@ -134,11 +135,10 @@ static int write_coclass( const type_t *class, const typelib_t *typelib )
if (typelib)
{
const UUID *typelib_uuid = get_attrp( typelib->attrs, ATTR_UUID );
unsigned int version = get_attrv( class->attrs, ATTR_VERSION );
if (!version) version = get_attrv( typelib->attrs, ATTR_VERSION );
put_str( indent, "TypeLib = s '%s'\n", format_uuid( typelib_uuid ));
put_str( indent, "Version = s '%u.%u'\n", MAJORVERSION(version), MINORVERSION(version) );
if (!version) version = get_attrv( typelib->attrs, ATTR_VERSION );
}
if (version) put_str( indent, "Version = s '%u.%u'\n", MAJORVERSION(version), MINORVERSION(version) );
if (vi_progid) put_str( indent, "VersionIndependentProgId = s '%s'\n", vi_progid );
put_str( --indent, "}\n" );
return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment