PDA

View Full Version : ActiveX - Integrate dumpcpp interfaces



durbrak
10th December 2006, 22:51
Hello,
I'm trying to adjust the volume of my WindowsMediaPlayer ActiveX control.
Unfortunately, I couldn't find the appropriate methods in QAxWidget::generateDocumentation() but I know they exist. It's actually IWMPSettings::setVolume() where I can adjust the volume.
Now I used Qt's dumpcpp tool to generate the namespace interface thingies but I have no clue how to use it. The generated .h file has the proper method:


class WMPLIB_EXPORT IWMPSettings : public QAxObject
{
public:
IWMPSettings(IDispatch *subobject = 0, QAxObject *parent = 0)
: QAxObject((IUnknown*)subobject, parent)
{
internalRelease();
}

//[...]

/*
Property volume

Returns current audio volume

*/
inline int volume() const; //Returns the value of volume
inline void setVolume(int value); //Sets the value of the volume property

//[...]
};

And here's how I tried it (inside my subclassed QAxWidget):


WMPLib::IWMPSettings *s = 0;
this->queryInterface("{9104D1AB-80C9-4fed-ABF0-2E6417A6DF14}", (void **)&s);
s->setVolume(75);

(I found the Uuid in the WMP-SDK and also on google) But all I get are runtime errors in s->setVolume() (well of course).

So am I understanding something wrong or is it really that hard to get it?

Thank you!

durbrak
11th December 2006, 16:11
*bump* :)

meat030
10th February 2011, 07:07
BUMP !
I too would like an answer to this

ChrisW67
10th February 2011, 07:54
Resurrecting a 4 year old thread is poor netiquette, doubly so when it is a Me Too!

Read the manual, particularly the Qutlook example.
Search the forum for "dumpcpp" or "activeqt", there are plenty of (more recent) threads about ActiveQt.
Ultimately you just use the generated classes like any other.

When you still cannot work it out, then start your own thread that actually states what the problem is, and what you have tried, and how it fails.