Source code of Windows XP (NT5)
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.

84 lines
1.6 KiB

  1. /**********************************************************************/
  2. /** Microsoft Windows/NT **/
  3. /** Copyright(c) Microsoft Corp., 1992 **/
  4. /**********************************************************************/
  5. /*
  6. w32handl.hxx
  7. Class declarations for the WIN32_HANDLE class.
  8. This class provides a simple wrapper around Win32 HANDLEs.
  9. FILE HISTORY:
  10. KeithMo 21-Jan-1992 Created.
  11. */
  12. #ifndef _W32HANDL_HXX_
  13. #define _W32HANDL_HXX_
  14. #include "base.hxx"
  15. /*************************************************************************
  16. NAME: WIN32_HANDLE
  17. SYNOPSIS:
  18. INTERFACE: WIN32_HANDLE - Class constructor.
  19. ~WIN32_HANDLE - Class destructor.
  20. PARENT: BASE
  21. HISTORY:
  22. KeithMo 21-Jan-1992 Created.
  23. **************************************************************************/
  24. DLL_CLASS WIN32_HANDLE : public BASE
  25. {
  26. private:
  27. //
  28. // Our handle.
  29. //
  30. HANDLE _hGeneric;
  31. protected:
  32. //
  33. // Set the handle this object represents. Note that this
  34. // is a protected method, to be invoked only by derived
  35. // subclasses.
  36. //
  37. VOID SetHandle( HANDLE hGeneric )
  38. { _hGeneric = hGeneric; }
  39. public:
  40. //
  41. // Usual constructor/destructor goodies.
  42. //
  43. WIN32_HANDLE( HANDLE hGeneric = NULL );
  44. ~WIN32_HANDLE();
  45. //
  46. // Query our handle.
  47. //
  48. HANDLE QueryHandle( VOID ) const
  49. { return _hGeneric; }
  50. //
  51. // Close our handle.
  52. //
  53. APIERR Close( VOID );
  54. }; // class WIN32_HANDLE
  55. #endif // _W32HANDL_HXX_