error C2228
WMPTalk.com Forum Index WMPTalk.com
Discuss Windows Media Player
 
 FAQFAQ   MemberlistMemberlist     RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 
Google
 
Web wmptalk.com
error C2228

 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK
Author Message
matthieu.bocktaels@lapost
Guest





Posted: Thu Dec 29, 2005 1:30 pm    Post subject: error C2228 Reply with quote

Hello,
I'm trying to host a WMP im a windows application using ActiveX.
So I've installed the WMP SDK.
After reading the doc, I've tried this :
" To host the Windows Media Player control using the CAxWindow
class, follow these steps:

Include the following headers:
#include "wmp.h"
#include <atlbase.h>
#include <atlcom.h>
#include <atlhost.h>
#include <atlctl.h>
Declare member variables, as follows:
CAxWindow m_wndView; // ActiveX host window class.
CComPtr<IWMPPlayer> m_spWMPPlayer; // Smart pointer to
IWMPPlayer interface.

When your application window is created, call AtlAxWinInit, which
is required when using the ATL ActiveX host window.
AtlAxWinInit();

Declare local variables for return codes and to contain the
pointer to the host window interface:
CComPtr<IAxWinHostWindow> spHost;
HRESULT hr;

etc......"

But when I compile my application I have a lot of errors like these:


C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(2945) : error C2065: '_Module' :
undeclared identifier
C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(2945) : error C2228: left of '.Lock'
must have class/struct/union type
C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(2947) : error C2228: left of '.Unlock'
must have class/struct/union type
C:\Program Files\Microsoft Visual
Studio\VC98\ATL\INCLUDE\atlcom.h(3318) : error C2228: left of
'.m_csTypeInfoHolder' must have class/struct/union type


It must be files that are missing but which ones?

Thanks for your help.

Matthieu Bocktaels

Back to top
 
Post new topic   Reply to topic    WMPTalk.com Forum Index -> SDK All times are GMT
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Microsoft Office Forum New Topics
Powered by phpBB