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

多媒体

开发平台:

Visual C++

  1. // ServerDlg.h : header file
  2. //
  3. #if !defined(AFX_SERVERDLG_H__1C4F2C47_8F65_4206_9828_5DAEFB9A62D3__INCLUDED_)
  4. #define AFX_SERVERDLG_H__1C4F2C47_8F65_4206_9828_5DAEFB9A62D3__INCLUDED_
  5. #if _MSC_VER > 1000
  6. #pragma once
  7. #endif // _MSC_VER > 1000
  8. /////////////////////////////////////////////////////////////////////////////
  9. // CServerDlg dialog
  10. #include "DPServer.h"
  11. class CServerDlg : public CDialog
  12. , public MediaMessageReqEvent
  13. {
  14. struct ComEnvironment
  15. {
  16. ComEnvironment()
  17. {
  18. // CoInitializeEx(NULL, COINIT_MULTITHREADED);
  19. CoInitialize(NULL);
  20. }
  21. ~ComEnvironment()
  22. {
  23. CoUninitialize();
  24. }
  25. }_ComEnvironment;
  26. // Construction
  27. CDPServer *m_DPServer;
  28. HANDLE    m_hMediaFile;
  29. LONGLONG m_llMediaLen;
  30. public:
  31. HRESULT OnNeedData(LONGLONG llDataPos,DWORD dwSize,DWORD * pdwGotSize,LPBYTE lpBuffer);
  32. HRESULT OnNeedLength(LONGLONG * llMediaLenght);
  33. CServerDlg(CWnd* pParent = NULL); // standard constructor
  34. // Dialog Data
  35. //{{AFX_DATA(CServerDlg)
  36. enum { IDD = IDD_SERVER_DIALOG };
  37. // NOTE: the ClassWizard will add data members here
  38. //}}AFX_DATA
  39. // ClassWizard generated virtual function overrides
  40. //{{AFX_VIRTUAL(CServerDlg)
  41. protected:
  42. virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
  43. //}}AFX_VIRTUAL
  44. // Implementation
  45. protected:
  46. HICON m_hIcon;
  47. // Generated message map functions
  48. //{{AFX_MSG(CServerDlg)
  49. virtual BOOL OnInitDialog();
  50. afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
  51. afx_msg void OnPaint();
  52. afx_msg HCURSOR OnQueryDragIcon();
  53. afx_msg void OnBtnOpen();
  54. afx_msg void OnBtnStart();
  55. afx_msg void OnDestroy();
  56. //}}AFX_MSG
  57. DECLARE_MESSAGE_MAP()
  58. };
  59. //{{AFX_INSERT_LOCATION}}
  60. // Microsoft Visual C++ will insert additional declarations immediately before the previous line.
  61. #endif // !defined(AFX_SERVERDLG_H__1C4F2C47_8F65_4206_9828_5DAEFB9A62D3__INCLUDED_)