none
'qedit.h' missing in current Windows SDK v7.0

    Question

  • Maybe I am missing something, but what happened to the 'qedit.h' header file in the last SDK? I have a program that makes use of ISampleGrabber. But I can not compile it since the qedit header is missing at all. Everything was fine till v6.1. Just in case I also checked the last DirectX SDK from March 2009 but without luck.

    I (for now) copied the related definitions from the v6.1 qedit.h. But since the documentation of v7.0 still mentions the qedit header (e.g. for ISampleGrabber) I am a little bit confused. Are the things like ISampleGrabber defined somewhere else? Or are there other reasons why the header is missing?

    Thanks, Yves
    Wednesday, July 08, 2009 1:13 PM

Answers

  • Hi,

    I don't know what the great reason was to remove qedit.h... All I could suggest is to use own header with interfaces and GUIDs required. Like following:

    ///////////////////////////////////////////////////////////////////////////////////
    
    #ifndef __qedit_h__
    #define __qedit_h__
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    #pragma once
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    interface
    ISampleGrabberCB
    :
    	public IUnknown
    {
    	virtual STDMETHODIMP SampleCB( double SampleTime, IMediaSample *pSample ) = 0;
    	virtual STDMETHODIMP BufferCB( double SampleTime, BYTE *pBuffer, long BufferLen ) = 0;
    };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    IID IID_ISampleGrabberCB = { 0x0579154A, 0x2B53, 0x4994, { 0xB0, 0xD0, 0xE7, 0x73, 0x14, 0x8E, 0xFF, 0x85 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    interface
    ISampleGrabber
    :
    	public IUnknown
    {
    	virtual HRESULT STDMETHODCALLTYPE SetOneShot( BOOL OneShot ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE SetMediaType( const AM_MEDIA_TYPE *pType ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE GetConnectedMediaType( AM_MEDIA_TYPE *pType ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE SetBufferSamples( BOOL BufferThem ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE GetCurrentBuffer( long *pBufferSize, long *pBuffer ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE GetCurrentSample( IMediaSample **ppSample ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE SetCallback( ISampleGrabberCB *pCallback, long WhichMethodToCallback ) = 0;
    };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    IID IID_ISampleGrabber = { 0x6B652FFF, 0x11FE, 0x4fce, { 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_VideoEffects1Category = { 0xcc7bfb42, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_VideoEffects2Category = { 0xcc7bfb43, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_AudioEffects1Category = { 0xcc7bfb44, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_AudioEffects2Category = { 0xcc7bfb45, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    #endif
    
    ///////////////////////////////////////////////////////////////////////////////////
    Wednesday, July 08, 2009 2:29 PM
  • I have not yet installed Windows SDK 7.0, primarily because of its RC state, but what I can see on my development system is that qedit.dll, which is C:\WINDOWS\system32\qedit.dll and, judging by its version information, belongs to DirectShow core, has a valid type library.

    It means that independently from SDK's header file it is quite possible to #import from its type library and be quite happy with imported interface definitions and UUIDs.

    It is going to be:

    #import "libid:78530B68-61F9-11D2-8CAD-00A024580902" 
    

    The library identifier is DexterLib, perhaps there will be someone here to drop in a few words why its codename was exactly "Dexter".

    http://alax.info/blog/tag/directshow
    Wednesday, July 08, 2009 9:26 PM
  • Chris has asked for feedback from the dshow team on the W7 SDK and I'm sure he'll follow up when we hear something back.

    I just received a response to an additional inquiry I put in on this.  The gist is that this will not be fixed for the official release of the Windows 7 SDK.

    The workaround is to use the qedit.h from a previous Windows SDK release as several people have done in this thread.  Another way to do it is using the #import technique that Roman outlined in this thread.

    Qedit.dll is still supported on Windows 7 and ships with it.

    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Thursday, July 23, 2009 7:51 PM
    Moderator

All replies

  • Hi,

    I don't know what the great reason was to remove qedit.h... All I could suggest is to use own header with interfaces and GUIDs required. Like following:

    ///////////////////////////////////////////////////////////////////////////////////
    
    #ifndef __qedit_h__
    #define __qedit_h__
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    #pragma once
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    interface
    ISampleGrabberCB
    :
    	public IUnknown
    {
    	virtual STDMETHODIMP SampleCB( double SampleTime, IMediaSample *pSample ) = 0;
    	virtual STDMETHODIMP BufferCB( double SampleTime, BYTE *pBuffer, long BufferLen ) = 0;
    };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    IID IID_ISampleGrabberCB = { 0x0579154A, 0x2B53, 0x4994, { 0xB0, 0xD0, 0xE7, 0x73, 0x14, 0x8E, 0xFF, 0x85 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    interface
    ISampleGrabber
    :
    	public IUnknown
    {
    	virtual HRESULT STDMETHODCALLTYPE SetOneShot( BOOL OneShot ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE SetMediaType( const AM_MEDIA_TYPE *pType ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE GetConnectedMediaType( AM_MEDIA_TYPE *pType ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE SetBufferSamples( BOOL BufferThem ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE GetCurrentBuffer( long *pBufferSize, long *pBuffer ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE GetCurrentSample( IMediaSample **ppSample ) = 0;
    	virtual HRESULT STDMETHODCALLTYPE SetCallback( ISampleGrabberCB *pCallback, long WhichMethodToCallback ) = 0;
    };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    IID IID_ISampleGrabber = { 0x6B652FFF, 0x11FE, 0x4fce, { 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_VideoEffects1Category = { 0xcc7bfb42, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_VideoEffects2Category = { 0xcc7bfb43, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_AudioEffects1Category = { 0xcc7bfb44, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    static
    const
    CLSID CLSID_AudioEffects2Category = { 0xcc7bfb45, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };
    
    ///////////////////////////////////////////////////////////////////////////////////
    
    #endif
    
    ///////////////////////////////////////////////////////////////////////////////////
    Wednesday, July 08, 2009 2:29 PM
  • The 7.0 SDK is a RC (Release Candidate), hopefully they will get this fixed for the final SDK release.  We'll pass the information on and let you know.

    www.chrisnet.net
    Wednesday, July 08, 2009 2:47 PM
  • @INondelegatingUnknown :  That is exactly what I did :).

    @Chris P_: I hope so. It was already a mess to handle the former qedit.h (-> dxtrans.h). Anyway, was just a try to check if it is running under Windows 7. I will switch back to v6.1 until the final release.


    Here is where I saw that it (probably) will be in DirectX SDK: http://social.msdn.microsoft.com/Forums/en-US/windowssdk/thread/a773acec-100f-483f-bfb7-a94ad0b9ff49

    Wednesday, July 08, 2009 3:03 PM
  • I've downloaded 6.0.6001.18000.367-KRMSDK_EN.iso one week ago. Official name is "Windows SDK for Windows Server 2008 and .NET Framework 3.5". There is also no qedit.h. And, unfortunately, I've not seen RC on download page... or this is different SDK?

    Wednesday, July 08, 2009 3:04 PM
  • For the 6.1 SDK they give you qedit.idl instead which you can compile in your project to generate the .h file or compile manually with MIDL.  It seems to be missing altogether from the 7.0 RC1 SDK.

    www.chrisnet.net
    Wednesday, July 08, 2009 3:08 PM
  • Mhh ... that Server 2008 is exactly the same SDK that I am using and I have the file at "C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\qedit.h".
    Wednesday, July 08, 2009 3:09 PM
  • Mhh ... that Server 2008 is exactly the same SDK that I am using and I have the file at "C:\Program Files\Microsoft SDKs\Windows\v6.1\Include\qedit.h".

    Me too and the datestamp on the file is the same as the .idl (2008-01-18).

    Chris has asked for feedback from the dshow team on the W7 SDK and I'm sure he'll follow up when we hear something back.


    My dshow site is http://tmhare.mvps.org.  Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    Wednesday, July 08, 2009 8:06 PM
    Moderator

  • I (for now) copied the related definitions from the v6.1 qedit.h. But since the documentation of v7.0 still mentions the qedit header (e.g. for ISampleGrabber) I am a little bit confused. Are the things like ISampleGrabber defined somewhere else? Or are there other reasons why the header is missing?


    That sounds like a reasonable solution (or just copy the parts you need into one of your headers as IDU suggested above).  One issue with qedit.h is that it is incompatible with the VMR9 headers.

    Also, I checked and qedit.dll is present in W7 RC (even on x64) so no need to worry about it going away.

    Finally, this thread shows that MSFT does listen to these types of reports so thanks for posting about it:



    My dshow site is http://tmhare.mvps.org.  Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    Wednesday, July 08, 2009 8:16 PM
    Moderator
  • I have not yet installed Windows SDK 7.0, primarily because of its RC state, but what I can see on my development system is that qedit.dll, which is C:\WINDOWS\system32\qedit.dll and, judging by its version information, belongs to DirectShow core, has a valid type library.

    It means that independently from SDK's header file it is quite possible to #import from its type library and be quite happy with imported interface definitions and UUIDs.

    It is going to be:

    #import "libid:78530B68-61F9-11D2-8CAD-00A024580902" 
    

    The library identifier is DexterLib, perhaps there will be someone here to drop in a few words why its codename was exactly "Dexter".

    http://alax.info/blog/tag/directshow
    Wednesday, July 08, 2009 9:26 PM
  • Mike or Geraint might know for sure, but Dexter was the internal dev code name before it was released as DirectShow Editing Services.  I think DEXTER was an abbreviation of DirectX Transformations Editor (or something along those lines). 


    www.chrisnet.net
    Wednesday, July 08, 2009 10:41 PM
  • Chris has asked for feedback from the dshow team on the W7 SDK and I'm sure he'll follow up when we hear something back.

    I just received a response to an additional inquiry I put in on this.  The gist is that this will not be fixed for the official release of the Windows 7 SDK.

    The workaround is to use the qedit.h from a previous Windows SDK release as several people have done in this thread.  Another way to do it is using the #import technique that Roman outlined in this thread.

    Qedit.dll is still supported on Windows 7 and ships with it.

    Please use Vote As Helpful (green up arrow at top-left of posts) and Mark As Answer where appropriate.
    My dshow site is http://tmhare.mvps.org.
    Thursday, July 23, 2009 7:51 PM
    Moderator
  • DEXTER was "Danny, Eric, Xuping (Wu), Ted, Everyone else, Really"... I know, cause I'm the one that named it. (laugh)

     


    ~ Eric R., Senior Dev, MS Research You can probably figure out more about me if you try!
    Tuesday, January 11, 2011 7:17 PM
  • //#include <qedit.h> // SampleGrabber—p

    #import

     

    "qedit.dll" raw_interfaces_only named_guids

    Now use the interfaces from DexterLib namespace.


    matraTech - your affordable solution partner
    Wednesday, August 24, 2011 6:05 PM
  • I used qedit.h with the following content

    ///////////////////////////////////////////////////////////////////////////////////

    #include <Unknwn.h>
    #include <strmif.h>

    #pragma comment(lib, "strmiids.lib")

    #ifndef __qedit_h__
    #define __qedit_h__

    ///////////////////////////////////////////////////////////////////////////////////

    #pragma once

    ///////////////////////////////////////////////////////////////////////////////////

    struct __declspec(uuid("0579154a-2b53-4994-b0d0-e773148eff85"))
    ISampleGrabberCB : IUnknown
    {
        //
        // Raw methods provided by interface
        //

          virtual HRESULT __stdcall SampleCB (
            double SampleTime,
            struct IMediaSample * pSample ) = 0;
          virtual HRESULT __stdcall BufferCB (
            double SampleTime,
            unsigned char * pBuffer,
            long BufferLen ) = 0;
    };




    struct __declspec(uuid("6b652fff-11fe-4fce-92ad-0266b5d7c78f"))
    ISampleGrabber : IUnknown
    {
        //
        // Raw methods provided by interface
        //

          virtual HRESULT __stdcall SetOneShot (
            long OneShot ) = 0;
          virtual HRESULT __stdcall SetMediaType (
            struct _AMMediaType * pType ) = 0;
          virtual HRESULT __stdcall GetConnectedMediaType (
            struct _AMMediaType * pType ) = 0;
          virtual HRESULT __stdcall SetBufferSamples (
            long BufferThem ) = 0;
          virtual HRESULT __stdcall GetCurrentBuffer (
            /*[in,out]*/ long * pBufferSize,
            /*[out]*/ long * pBuffer ) = 0;
          virtual HRESULT __stdcall GetCurrentSample (
            /*[out,retval]*/ struct IMediaSample * * ppSample ) = 0;
          virtual HRESULT __stdcall SetCallback (
            struct ISampleGrabberCB * pCallback,
            long WhichMethodToCallback ) = 0;
    };


    static const IID IID_ISampleGrabber = { 0x6B652FFF, 0x11FE, 0x4fce, { 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F } };
    static const IID IID_ISampleGrabberCB = { 0x0579154A, 0x2B53, 0x4994, { 0xB0, 0xD0, 0xE7, 0x73, 0x14, 0x8E, 0xFF, 0x85 } };
    static const CLSID CLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };
    static const CLSID CLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };

    #endif

    • Proposed as answer by ankur.dj Wednesday, August 14, 2013 6:43 AM
    Wednesday, August 14, 2013 6:43 AM
  • Thanks! In VS2013, some additional headers should be included. My following adjustment works.

    ///////////////////////////////////////////////////////////////////////////////////
    //ref: http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/2ab5c212-5824-419d-b5d9-7f5db82f57cd/qedith-missing-in-current-windows-sdk-v70?forum=windowsdirectshowdevelopment
    //
    #ifndef __qedit_h__
    #define __qedit_h__

    ///////////////////////////////////////////////////////////////////////////////////

    #pragma once
    #ifndef COM_NO_WINDOWS_H
    #include "windows.h"
    #include "ole2.h"
    #include <strmif.h>
    #endif /*COM_NO_WINDOWS_H*/


    ///////////////////////////////////////////////////////////////////////////////////

    interface
      ISampleGrabberCB
      :
      public IUnknown
    {
      virtual STDMETHODIMP SampleCB(double SampleTime, IMediaSample *pSample) = 0;
      virtual STDMETHODIMP BufferCB(double SampleTime, BYTE *pBuffer, long BufferLen) = 0;
    };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    IID IID_ISampleGrabberCB = { 0x0579154A, 0x2B53, 0x4994, { 0xB0, 0xD0, 0xE7, 0x73, 0x14, 0x8E, 0xFF, 0x85 } };

    ///////////////////////////////////////////////////////////////////////////////////

    interface
      ISampleGrabber
      :
      public IUnknown
    {
      virtual HRESULT STDMETHODCALLTYPE SetOneShot(BOOL OneShot) = 0;
      virtual HRESULT STDMETHODCALLTYPE SetMediaType(const AM_MEDIA_TYPE *pType) = 0;
      virtual HRESULT STDMETHODCALLTYPE GetConnectedMediaType(AM_MEDIA_TYPE *pType) = 0;
      virtual HRESULT STDMETHODCALLTYPE SetBufferSamples(BOOL BufferThem) = 0;
      virtual HRESULT STDMETHODCALLTYPE GetCurrentBuffer(long *pBufferSize, long *pBuffer) = 0;
      virtual HRESULT STDMETHODCALLTYPE GetCurrentSample(IMediaSample **ppSample) = 0;
      virtual HRESULT STDMETHODCALLTYPE SetCallback(ISampleGrabberCB *pCallback, long WhichMethodToCallback) = 0;
    };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    IID IID_ISampleGrabber = { 0x6B652FFF, 0x11FE, 0x4fce, { 0x92, 0xAD, 0x02, 0x66, 0xB5, 0xD7, 0xC7, 0x8F } };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    CLSID CLSID_SampleGrabber = { 0xC1F400A0, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    CLSID CLSID_NullRenderer = { 0xC1F400A4, 0x3F08, 0x11d3, { 0x9F, 0x0B, 0x00, 0x60, 0x08, 0x03, 0x9E, 0x37 } };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    CLSID CLSID_VideoEffects1Category = { 0xcc7bfb42, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    CLSID CLSID_VideoEffects2Category = { 0xcc7bfb43, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    CLSID CLSID_AudioEffects1Category = { 0xcc7bfb44, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };

    ///////////////////////////////////////////////////////////////////////////////////

    static
    const
    CLSID CLSID_AudioEffects2Category = { 0xcc7bfb45, 0xf175, 0x11d1, { 0xa3, 0x92, 0x0, 0xe0, 0x29, 0x1f, 0x39, 0x59 } };

    ///////////////////////////////////////////////////////////////////////////////////

    #endif

    ///////////////////////////////////////////////////////////////////////////////////

    Thursday, July 31, 2014 3:03 AM