![]() | TranslatePhysicalName |
Translates a physical repeated capability name to a virtual repeated capability name.
virtual CString TranslatePhysicalName(const CString& strPhysicalName) const abstract;
[in] Physical name to be translated.
Returns the virtual name if the translation was successful, otherwise strPhysicalName is returned.
This function uses the physical-to-virtual name mappings created by the end user in the IVI Configuration Store. If strPhysical does not have a virtual name mapping, this function simply returns strPhysical.
The following example demonstrates use of the TranslatePhysicalName function.
// CoAcme4321.cpp HRESULT Acme4321::GetChannelName(BSTR* pbstrName) { HRESULT hr = S_OK; CString strPhysicalName = "CH1"; // Always hand out virtual names to the user CString strVirtualName = TranslatePhysicalName(strPhysicalName); *pbstrName = strVirtualName.AllocSysString(); return hr; }