Results 1 to 5 of 5

Thread: WMP ActiveX

  1. #1
    Join Date
    Oct 2007
    Posts
    3

    Default WMP ActiveX

    i have an application where i need to use the windows media player 11 as activeX control, and to access it programatically. I would like to start/pause/stop it over own buttons for instance.
    I created the QAxWidget object using the setControl() method and the WMP 11 CLS_ID. Then I used QueryInterface() to get a pointer to the IWMPControls interface. The returned pointer is not null, but any call to an interface method (for instance i try to call the method isAvailable("play") from IWMPControls) leads to a crash. I generated the cpp and h files for the WMP interface using the dumpcpp tool.
    Can anyone help please ?
    Thanks in advance.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: WMP ActiveX

    Can we see the code? What happens if you use dynamicCall() instead?

  3. #3
    Join Date
    Oct 2007
    Posts
    3

    Default Re: WMP ActiveX

    Quote Originally Posted by wysota View Post
    Can we see the code? What happens if you use dynamicCall() instead?
    I dont think I can use dynamicCall(), as the controls() method of WMPlayer interface returns a pointer to IWMPControls. Or is there any possibility to cast a QVariant object to a IWMPControls pointer ?

  4. #4
    Join Date
    Sep 2007
    Location
    Szczecin, Poland
    Posts
    153
    Thanks
    7
    Thanked 11 Times in 8 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: WMP ActiveX

    Did You tried to use querySubObject()?

    it returns QAxObject instead of raw interface, so You should be able to use dynamicCall() to use methods encapsulated in subobjects.

  5. #5
    Join Date
    Oct 2007
    Posts
    3

    Default Re: WMP ActiveX

    Quote Originally Posted by mchara View Post
    Did You tried to use querySubObject()?

    it returns QAxObject instead of raw interface, so You should be able to use dynamicCall() to use methods encapsulated in subobjects.
    You are right, querySubObject() did the job !
    Thank you for the good hint.

Similar Threads

  1. Replies: 3
    Last Post: 7th October 2015, 19:43
  2. ActiveX - Integrate dumpcpp interfaces
    By durbrak in forum Qt Programming
    Replies: 3
    Last Post: 10th February 2011, 06:54
  3. Load ActiveX from file
    By Passer_dj in forum Qt Programming
    Replies: 1
    Last Post: 13th August 2007, 23:24
  4. How can i use ActiveX
    By mmg123 in forum Qt Tools
    Replies: 6
    Last Post: 3rd October 2006, 11:18
  5. Replies: 6
    Last Post: 3rd February 2006, 09:48

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.