#46 Please add single-parameter version of QueryInterface()

closed-fixed
nobody
Headers (19)
5
2012-02-26
2011-05-12
No

Hi,

This is forwarded from http://bugs.debian.org/625497#57:

2. Also, QueryInterface method exists with only one parameter too (instead of the usual two), see http://support.microsoft.com/kb/194862 for ex. But mingw-w64 does not accept it, so I was forced to make ifdef to add the same method but with two parameters.

Regards,

Stephen

Discussion

  • Jonathan Yong

    Jonathan Yong - 2011-05-13

    Try defining USE___UUIDOF, see if that helps, and make sure to use a version of GCC that supports __uuidof keywords.

     
  • Jonathan Yong

    Jonathan Yong - 2011-05-13
    • labels: 1008202 --> Headers
     
  • Eugen Dedu

    Eugen Dedu - 2011-05-13

    I'll do it and keep you informed, thank you.

    By checking if gcc supports __uuidof, do you mean to check that compiler gets *inside* USE___UUIDOF condidtional?

     
  • Jonathan Yong

    Jonathan Yong - 2011-05-13

    I meant adding -DUSE___UUIDOF when calling gcc.

     
  • Eugen Dedu

    Eugen Dedu - 2011-05-19

    I'll do it and keep you informed, thank you.

    By checking if gcc supports __uuidof, do you mean to check that compiler gets *inside* USE___UUIDOF condidtional?

     
  • Eugen Dedu

    Eugen Dedu - 2011-05-19

    Sorry for previous post.

    I added
    #define USE___UUIDOF
    at the beginning of the .cxx file, I still receive the error:
    ptlib/msos/directshow.cxx: In member function ‘virtual bool PVideoInputDevice_DirectShow::GetDeviceCapabilities(PVideoInputDevice::Capabilities*) const’:
    ptlib/msos/directshow.cxx:542:3: error: no matching function for call to ‘IPin::QueryInterface(IAMStreamConfig**)’
    /usr/lib/gcc/i686-w64-mingw32/4.5.3/../../../../i686-w64-mingw32/include/unknwn.h:67:25: note: candidate is: virtual HRESULT IUnknown::QueryInterface(const IID&, void**)

    Even after adding -DUSE___UUIDOF in the command line, i still receive the error.

     
  • Jonathan Yong

    Jonathan Yong - 2011-05-20

    I just found out USE___UUIDOF is defined to 0 in _mingw.h, so adding to -D won't help, try adjusting _mingw.h instead.

    Sorry, my installed GCC is too old to test it out.

     
  • Eugen Dedu

    Eugen Dedu - 2011-07-21

    Sorry to answer so late, I have finally been able to test it.

    If I change _mingw.h like this:
    #define USE___UUIDOF 1
    then I have other errors before seeing if it fixes my problem or not.

    Some of these errors are:
    ptlib/msos/vfw.cxx:55:0: warning: "WM_USER" redefined [enabled by default]
    /usr/lib/gcc/i686-w64-mingw32/4.6.1/../../../../i686-w64-mingw32/include/winuser.h:1296:0: note: this is the location of the previous definition
    ptlib/msos/vfw.cxx:58:0: warning: "capSetCallbackOnError" redefined [enabled by default]
    /usr/lib/gcc/i686-w64-mingw32/4.6.1/../../../../i686-w64-mingw32/include/vfw.h:1735:0: note: this is the location of the previous definition
    ptlib/msos/vfw.cxx:59:0: warning: "capSetCallbackOnFrame" redefined [enabled by default]
    /usr/lib/gcc/i686-w64-mingw32/4.6.1/../../../../i686-w64-mingw32/include/vfw.h:1738:0: note: this is the location of the previous definition

    Another error is that configure answers "no" instead of yes to:
    checking mingw_dshow_port.h usability... no
    checking mingw_dshow_port.h presence... yes
    configure: WARNING: mingw_dshow_port.h: present but cannot be compiled
    configure: WARNING: mingw_dshow_port.h: check for missing prerequisite headers?
    configure: WARNING: mingw_dshow_port.h: see the Autoconf documentation
    configure: WARNING: mingw_dshow_port.h: section "Present But Cannot Be Compiled"
    configure: WARNING: mingw_dshow_port.h: proceeding with the compiler's result
    checking for mingw_dshow_port.h... no
    checking control.h usability... no
    checking control.h presence... yes
    configure: WARNING: control.h: present but cannot be compiled
    configure: WARNING: control.h: check for missing prerequisite headers?
    configure: WARNING: control.h: see the Autoconf documentation
    configure: WARNING: control.h: section "Present But Cannot Be Compiled"
    configure: WARNING: control.h: proceeding with the compiler's result
    checking for control.h... no
    checking ddraw.h usability... no
    checking ddraw.h presence... yes
    configure: WARNING: ddraw.h: present but cannot be compiled
    configure: WARNING: ddraw.h: check for missing prerequisite headers?
    [...]

    So it breaks in many other places.

    Do you have other idea?

     
  • Jonathan Yong

    Jonathan Yong - 2011-07-22

    I think the headers assume some of the definitions aren't available, as in mingw.org's case, so they declare their own, conflicting with mingw-w64.

    For the configure run, please post config.log.

     
  • Eugen Dedu

    Eugen Dedu - 2011-07-22

    In my previous comment, the first part was about warnings, and they appear with mingw32, sorry.

    I attach config.log, the interesting part is from mingw_dshow_port.h check to strmif.h check (they are no instead of yes). Also, I attach the output of make. Note that the file with QueryInterface "error" (the subject of this bug report) has not yet been compiled by make.

     
  • Eugen Dedu

    Eugen Dedu - 2011-07-22

    As I do not succed in attaching files in sf, I put them at http://eugen.dedu.free.fr/mingw/

     
  • Jacek Caban

    Jacek Caban - 2011-09-12

    He have limited support for __uuidof in the tree now.

     
  • Ozkan Sezer

    Ozkan Sezer - 2011-09-12
    • status: open --> pending
     
  • Eugen Dedu

    Eugen Dedu - 2012-02-16

    It works with current debian unstable mingw-w64 (2.0.1+svn4784-2), sorry for having waited so long.

    Pleas close it.

     
  • Stephen Kitt

    Stephen Kitt - 2012-02-26
    • status: pending --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks