Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

63 lines
1.6 KiB

  1. #ifndef _EDATAOBJ_H_
  2. #define _EDATAOBJ_H_
  3. #include "dataobj.h"
  4. //EDATAOBJ.CPP
  5. LRESULT WINAPI DataObjectWndProc(HWND, UINT, WPARAM, LPARAM);
  6. class CAppVars
  7. {
  8. friend LRESULT WINAPI DataObjectWndProc(HWND, UINT, WPARAM, LPARAM);
  9. protected:
  10. HINSTANCE m_hInst; //WinMain parameters
  11. HINSTANCE m_hInstPrev;
  12. LPSTR m_pszCmdLine;
  13. UINT m_nCmdShow;
  14. HWND m_hWnd; //Main window handle
  15. BOOL m_fInitialized; //Did CoInitialize work?
  16. //We have multiple classes, one for each data size.
  17. // DWORD m_rgdwRegCO[DOSIZE_CSIZES];
  18. // LPCLASSFACTORY m_rgpIClassFactory[DOSIZE_CSIZES];
  19. DWORD m_dwRegCO;
  20. LPCLASSFACTORY m_pIClassFactory;
  21. public:
  22. CAppVars(HINSTANCE, HINSTANCE, LPSTR, UINT);
  23. ~CAppVars(void);
  24. BOOL FInit(void);
  25. };
  26. typedef CAppVars *PAPPVARS;
  27. void PASCAL ObjectDestroyed(void);
  28. //This class factory object creates Data Objects.
  29. class CDataObjectClassFactory : public IClassFactory
  30. {
  31. protected:
  32. ULONG m_cRef;
  33. public:
  34. CDataObjectClassFactory();
  35. ~CDataObjectClassFactory(void);
  36. //IUnknown members
  37. STDMETHODIMP QueryInterface(REFIID, PPVOID);
  38. STDMETHODIMP_(ULONG) AddRef(void);
  39. STDMETHODIMP_(ULONG) Release(void);
  40. //IClassFactory members
  41. STDMETHODIMP CreateInstance(LPUNKNOWN, REFIID, PPVOID);
  42. STDMETHODIMP LockServer(BOOL);
  43. };
  44. typedef CDataObjectClassFactory *PCDataObjectClassFactory;
  45. #endif //_EDATAOBJ_H_