IStringDisplayableConcept::ToDisplayString 方法 (dbgmodel.h)
每當用戶端想要將對象轉換成要顯示的字串時,就會呼叫 ToDisplayString 方法(在 UI 等中為控制台...)。這類字串轉換不應用於其他程序設計作的基礎。 字串轉換本身可能會受到傳遞至呼叫的元數據的影響。 字串轉換應該嘗試接受 PreferredRadix 和 PreferredFormat 索引鍵。
語法
HRESULT ToDisplayString(
IModelObject *contextObject,
IKeyStore *metadata,
BSTR *displayString
);
參數
contextObject
要轉換成顯示字串的實例(此指標)會在此自變數中傳遞。
metadata
選擇性元數據存放區,定義呼叫端希望字串轉換的方式。 實作應該嘗試接受存放區中的要求(特別是 PreferredRadix 和 PreferredFormat 索引鍵)。
displayString
此處會傳回由 SysAllocString 函式配置的字串轉換。
傳回值
此方法會傳回 HRESULT,指出成功或失敗。
要求
要求 | 價值 |
---|---|
標頭 | dbgmodel.h |