Template:AVO Sample of trace properties

From AVObjects Knowledge Base
Revision as of 17:00, 9 July 2014 by Rod (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Trace all object's properties=

  //Query IAVProperties interface
  CComQIPtr<IAVProperties> spProps(spObject);
 
  //Get list name=value pairs separated <CR>
  //for all properties of object
  CComBSTR cbsPropsList;
  HRESULT hr = spProps->PropsGet(L"\n", cbsPropsList);
  ATLASSERT(hr == S_OK);
 
  //Trace properties	
  ATLTRACE2(atlTraceGeneral, 2, L"Properties for spObject:\n%ls\n", 
	spPropsList);
Personal tools