On Wed Jun 18 11:31:12 2025 +0000, Hans Leidekker wrote:
Sure this should probably be generalized. I didn't get to imported types yet.
Seems to me that something like that instead would make it work, do you think it's more complicated?
``` static UINT add_name( type_t *type, UINT *namespace ) { UINT name = add_string( type->name ); if (!type->namespace) *namespace = add_string( "Windows.Foundation" ); else { char *str = format_namespace( type->namespace, "", ".", NULL, NULL ); *namespace = add_string( str ); free( str ); } return name; }
/* ... */
if (type->name) { UINT assemblyref, scope, name, namespace; name = add_name( type, &namespace ); assemblyref = add_assemblyref_row( 0x200, 0, namespace ); scope = resolution_scope( TABLE_ASSEMBLYREF, assemblyref ); type->md.ref = add_typeref_row( scope, name, namespace ); } ```