I've been working on some COPP related code sample on Vista, I could not see the graph I had built. Was this because I was using the EVR instead of the VMR9 as I was on XP?

Well no. I read Loading a Graph From an External Process and registered Proppage.dll.

This was still not working.

As usual when using developer tools, I launched graphedt.exe as an administrator and voilà!

#pragma once

 

//********************************************************************************

//*

//* RunningObjectTableFilterEntry class: this will alow us to see the graph with

//* the graph editor. (graphedt.exe)

//*

//* Note  Starting in Windows Vista, you must register proppage.dll

//*       to enable this feature. Proppage.dll is included in the Windows SDK.

//*

//********************************************************************************

 

class RunningObjectTableFilterEntry {

public:

   RunningObjectTableFilterEntry(IFilterGraph * filterGraph) : m_registrationValue(0) {

      IRunningObjectTablePtr runningObjectTable;

      if (FAILED(GetRunningObjectTable(0, & runningObjectTable))) {

         throw runtime_error("GetRunningObjectTable failed");

      }

      wostringstream monikerStringStream;

      monikerStringStream << L"FilterGraph " << hex << filterGraph 

                          << L" pid "<< hex << GetCurrentProcessId();

 

      IMonikerPtr moniker;

      if (FAILED(CreateItemMoniker(L"!", monikerStringStream.str().c_str(), & moniker))) {

         throw runtime_error("CreateItemMoniker failed");

      }

 

      if (FAILED(runningObjectTable->Register(ROTFLAGS_REGISTRATIONKEEPSALIVE, filterGraph, moniker, & m_registrationValue))) {

         throw runtime_error("CreateItemMoniker failed");

      }

   }

 

   ~RunningObjectTableFilterEntry() {

      IRunningObjectTablePtr runningObjectTable;

      if (SUCCEEDED(GetRunningObjectTable(0, & runningObjectTable))) {

         runningObjectTable->Revoke(m_registrationValue);

      }

   }

private:

   DWORD m_registrationValue;

} ;