Retrieving Each Server in the Array

The following code creates a tree for storing the information retrieved for each server and adapter.

  1. Create the tree that stores the server and adapter information, shown here:
    	/* Make the root of the tree */
    	HTREEITEM RootItem = m_ListTree.InsertItem( _T("All Servers"), 0, 0);
    	HTREEITEM ServItem;
    	/* Make headlines */
    	m_ListCtl.InsertColumn( 0, _T("Server Name") );
    	m_ListCtl.InsertColumn( 1, _T("Adapter Description") );
    	m_ListCtl.SetColumnWidth( 0, LVSCW_AUTOSIZE_USEHEADER );
    	m_ListCtl.SetColumnWidth( 1, LVSCW_AUTOSIZE_USEHEADER);
  2. Find each server in the array, shown here:
    	/* Go along the hierarchy to find the all the servers */
    	/* and their adapters								 */
    	FPCLib::IFPCSnapinNodePtr spiFPCSnapinNode(m_pDataObject);
    	FPCLib::IFPCServersPtr spiServers(spiFPCSnapinNode->CurrentObject);

Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.