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.

77 lines
2.0 KiB

  1. //+-------------------------------------------------------------------------
  2. //
  3. // Microsoft Windows
  4. // Copyright (C) Microsoft Corporation, 1992 - 1992.
  5. //
  6. // File: cubes.hxx
  7. //
  8. // Contents: Class to encapsulate demo of distributed binding interface
  9. //
  10. // Classes: CCube
  11. //
  12. // History: 06-Aug-92 Rickhi Created
  13. //
  14. //--------------------------------------------------------------------------
  15. #ifndef __CUBES__
  16. #define __CUBES__
  17. #include <otrack.hxx>
  18. #include <icube.h> // interface def
  19. #define CUBE_UNDEF 0xFFFFFFFF
  20. #define CUBE_DIAMETER 10
  21. STDAPI CoGetCallerTID(DWORD *pTIDCaller);
  22. STDAPI CoGetCurrentLogicalThreadId(GUID *pguid);
  23. //+-------------------------------------------------------------------------
  24. //
  25. // Class: CCube
  26. //
  27. // Purpose: Class to demostrate remote binding functionality
  28. //
  29. // Interface: QueryInterface
  30. // AddRef
  31. // Release
  32. // CreateCube - create a Cube
  33. // MoveCube - move a Cube
  34. // GetCubePos - get the Cube position (x,y)
  35. // IsOverLapped - see if other Cube is overlapped with this Cube
  36. // IsContainedIn - see if Cube is inside given cube
  37. // Clone - make a new Cube at the same position as this
  38. //
  39. // History: 06-Aug-92 Rickhi Created
  40. //
  41. //--------------------------------------------------------------------------
  42. class CCube : INHERIT_TRACKING,
  43. public ICube
  44. {
  45. public:
  46. CCube(void);
  47. STDMETHOD(QueryInterface)(REFIID riid, void **ppunk);
  48. DECLARE_STD_REFCOUNTING;
  49. // ICube interface
  50. STDMETHOD(CreateCube)(ULONG xPos, ULONG yPos);
  51. STDMETHOD(MoveCube)(ULONG xPos, ULONG yPos);
  52. STDMETHOD(GetCubePos)(ULONG *xPos, ULONG *yPos);
  53. STDMETHOD(Contains)(IBalls *pIBall);
  54. STDMETHOD(SimpleCall)(DWORD pidCaller, DWORD tidCaller, GUID lidCaller);
  55. STDMETHODIMP PrepForInputSyncCall(IUnknown *pUnkIn);
  56. STDMETHODIMP InputSyncCall();
  57. private:
  58. ~CCube(void);
  59. ULONG _xPos;
  60. ULONG _yPos;
  61. IUnknown *_pUnkIn;
  62. };
  63. #endif // __CUBES__