DPServer.h
上传用户:weiliangfb
上传日期:2007-01-23
资源大小:142k
文件大小:1k
源码类别:

多媒体

开发平台:

Visual C++

  1. // DPServer.h: interface for the CDPServer class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4. #if !defined(AFX_DPSERVER_H__41DF7BFA_FEA9_4884_9778_B3461AF049C8__INCLUDED_)
  5. #define AFX_DPSERVER_H__41DF7BFA_FEA9_4884_9778_B3461AF049C8__INCLUDED_
  6. #if _MSC_VER > 1000
  7. #pragma once
  8. #endif // _MSC_VER > 1000
  9. #include <dplay8.h>
  10. #include "ProtocalDef.h"
  11. class CDPServer  
  12. {
  13. BOOL m_bSessionStarted ;
  14. MediaMessageReqEvent * m_MediaMessageEvent;
  15. IDirectPlay8Address*                m_pDeviceAddress;
  16. BOOL IsServiceProviderValid(IDirectPlay8Server * lpDPServer,const GUID* pGuidSP);
  17. IDirectPlay8Server*                 m_pDPServer;
  18. HRESULT Inner_DirectPlayMessageHandler(DWORD dwMessageType, PVOID pMessage);
  19. static HRESULT WINAPI Shell_DirectPlayMessageHandler( PVOID pvUserContext,DWORD dwMessageType,PVOID pMessage);
  20. void CleanupDirectPlay();//清除Directplay
  21. HRESULT InitDirectPlay();//初始化Directplay
  22. HRESULT HostSession();
  23. HRESULT PumpVBMessage(PDPNMSG_RECEIVE pReceiveMessage);
  24. void SendBuffer(DPNID SendTo,LPBYTE lpBuffer,DWORD dwSize);
  25. public:
  26. HRESULT CreateDeviceAddress();//创建设备地址
  27. HRESULT StartSession();
  28. CDPServer(MediaMessageReqEvent * Event);
  29. virtual ~CDPServer();
  30. };
  31. #endif // !defined(AFX_DPSERVER_H__41DF7BFA_FEA9_4884_9778_B3461AF049C8__INCLUDED_)