   The "qedit.h" solution (or workaround)
  Upon discovering the incompatibility issues associatedwith the infamous "qedit.h"-file, mixing both Directshowand DirectX 3D in the same application soon becamenightmarish !!I have seen the problems posted numeruos places, but alas -I have found no solutionIt then occured to me, that my fancy classes (nicelyencapsulating the ugly D3DDSHOW__IID_BEGINRENDER_SOmetimes_when_IamTRUEwritingTHISstupidSYNTAX**sighÆÆÆshould be done as such:Whereever I need the "qedit.h" (using the SampleGrabberfilter f.inst, I would include the file in the c-file only (!!),thus hiding the qedit-related interfaces completely from therest of the appThen I can include, say "d3dx8.h" with no headacheTo illustrate my idea, I pose here my SampleGrabber-filterclass Fgrab (.H and .C -files) along with the base classFbase (which it enherits)The surce file uses a couple of global variables, whichneeds some refinement, of course ...my i(4) constructs are macros rebresenting simple for-loops** I do not think this qedit.h incompability stuff has** really been resolved yet. If anyone knows otherwise** please come visit. I''ll make tea ENJOY !-------------------------------FGRAB HEADER FILE-------------------------------#ifndef FGRAB_H#define FGRAB_H#include "fbase.h"class Fgrabublic Fbase{pubFgrab();~Fgrab();void cb(void (*)(byte*,int));};#endif-------------------------------FGRAB SOURCE FILE  (using the qedit.h file)-------------------------------#include "fgrab.h"#include "qedit.h"ISampleGrabber* isg;void (*pf)(byte*,int);class grabberCBublic ISampleGrabberCB{pubSTDMETHODIMP_(ULONG) AddRef()  { return 2; }STDMETHODIMP_(ULONG) Release() { return 1; }STDMETHODIMP QueryInterface(REFIID riid, void ** ppv){return E_NOINTERFACE;}STDMETHODIMP SampleCB( double SampleTime, IMediaSample * pSample ){  return 0;}STDMETHODIMP BufferCB( double time, BYTE* buf, long len ){pf(buf,len);return 0;}}gcb;Fgrab::Fgrab(){coc(CLSID_SampleGrabber)cstr();qif(isg,IID_ISampleGrabber)}Fgrab::~Fgrab(){}void Fgrab::cb(void (*p)(byte*,int)){pf=p;AM_MEDIA_TYPE mt;zero(mt);mt.majortype = MEDIATYPE_Video;mt.subtype = MEDIASUBTYPE_RGB24;isg->SetMediaType(&mt;isg->SetBufferSamples(TRUE);isg->SetCallback(&gcb,1);}-------------------------------FBASE HEADER FILE (the base class for my filters)-------------------------------#ifndef FBASE_H#define FBASE_H#include "inc.h"#include <dshow.h>class Fbase{proIBaseFilter*f;pubIPin* ipin[4];IPin* opin[4];Fbase();~Fbase();void cstr();IBaseFilter* operator!();void pins();};#define coc(x) CoCreateInstance(x,NULL,CLSCTX_INPROC_SERVER,IID_IBaseFilter,(void **)&f);#define qif(x,y)f->QueryInterface (y,(void**)&x);#endif-------------------------------FBASE SOURCE FILE-------------------------------#include "Fbase.h"Fbase::Fbase(){}Fbase::~Fbase(){}void Fbase::cstr(){pins();}IBaseFilter* Fbase::operator!(){ return f;}void Fbase:ins(){IEnumPins* iep;IPin* ip;PIN_INFO pi;PIN_DIRECTION pd;i(4)ipin=opin=NULL;int ipc=0;int opc=0;f->EnumPins(&iep);while(!iep->Next(1,&ip,0)){ip->QueryDirection(&pd);if(pd==PINDIR_INPUT)ipin[ipc++]=ip;if(pd==PINDIR_OUTPUT)opin[opc++]=ip;}}  </i>  
  oops the funny : smile in the codereplaces two colons and a p 