Pergunta

I've encountered the raw_native_types in a tlb import statement and I'm unclear of what the benefit of this attribute is. I've read the MSDN description for this (http://msdn.microsoft.com/en-us/library/8etzzkb6%28v=vs.71%29.aspx#_predir_raw_native_types) but it hasn't helped clearing it up for me. Can someone help explain it to me?

Thanks.

Foi útil?

Solução

The intention defines the benefit. If one really doesn't want to use _bstr_t or _variant_t because, who knows, one abominates them (not that uncommon), or one doesn't trust the compiler to actually do a good job at keeping them alive, or one already uses other smart wrappers, or one really likes to explicitly call SysFreeString and VariantClear, then one specifies raw_native_types.

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top