Hi All
I'm trying to invoke WMP on a Windows Mobile 6 device - with not
too much success. The code snippet that I use is:

IWMPPlayer *pWP;
IWMPSettings *pWPSet;
IWMPControls *pWPCtrl;

CoInitializeEx(NULL,COINIT_MULTITHREADED);
HRESULT hr = S_OK;
CComBSTR bstrVersionInfo;
BSTR mybstr;
hr = CoCreateInstance( __uuidof(WindowsMediaPlayer), NULL,
CLSCTX_INPROC_SERVER, __uuidof (IWMPPlayer4),(void **)&pWP);
hr = pWP->QueryInterface(__uuidof(IWMPSettings), (void **)&pWPSet);
hr = pWP->QueryInterface(__uuidof(IWMPControls), (void **)&pWPCtrl);
mybstr = SysAllocString(L"\testmp3\Alarm3.wma");
//hr = pWP->openPlayer(mybstr);
hr = pWPSet->put_autoStart(TRUE);
hr = pWP->put_URL(mybstr);


Issue No.1:
All the hr's are expected values except for put_URL() which returns a
S_FALSE - which I later found is ok. When I
alternatively try to use the openPlayer method it returns E_NOIMPL
which is also supposed to be fine for WMP version 10 according to MSDN
docs. But inspite of all this there's nothing happening on my mobile
device. What am I doing wrong???
BTw I also tried using get_controls and get_settings instead of
queryInterface method - still nothing. The process seems so straight
forward - but I'm clueless as to what's going on. Also, I tried using
a proper URL instead of a file name - still zilch.


Issue No.2:
When I try to include atlhost.h to my sln it returns an error that
CAxWindow is not declared. I'm able to compile and work the sln fine
with atlbase.h and atlwin.h. Why is there a problem with atlhost.h.


Issue No.3:
If I ever get to solve issue no.1, I want to try invoking WMP in the
windowless mode. The MSDN docs talk about the
IOleInPlaceObjectWindowless interface to achieve this, but I'm not
clear on how to use it. Any pointers there will be appreciated.


Sorry for the long post - but this is really driving me crazy - what
am I missing out??? Any help here will be hugely appreciated!!!


Thanks and regards
Sindy