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.

64 lines
1.7 KiB

  1. /*****************************************************************************
  2. * Copyright (c) 1998-2001 Microsoft Corporation, All Rights Reserved
  3. *
  4. * All Rights Reserved
  5. *
  6. * This software is furnished under a license and may be used and copied
  7. * only in accordance with the terms of such license and with the inclusion
  8. * of the above copyright notice. This software or any other copies thereof
  9. * may not be provided or otherwise made available to any other person. No
  10. * title to and ownership of the software is hereby transferred.
  11. *****************************************************************************/
  12. //============================================================================
  13. //
  14. // CMutex.h -- Mutex Wrapper
  15. //
  16. // Copyright (c) 1998-2001 Microsoft Corporation, All Rights Reserved
  17. //
  18. // Revisions: 6/26/98 a-kevhu Created
  19. //
  20. //============================================================================
  21. #ifndef __CMUTEX_H__
  22. #define __CMUTEX_H__
  23. #include "CKernel.h"
  24. class CMutex : public CKernel {
  25. public:
  26. CMutex(BOOL bInitialOwner = FALSE,
  27. LPCTSTR lpName = NULL,
  28. LPSECURITY_ATTRIBUTES lpMutexAttributes = NULL);
  29. // Constructor opens an existing named mutex.
  30. // Check the status after using this constructor, as it will
  31. // NOT throw an error exception if the object cannot be opened.
  32. CMutex(LPCTSTR lpName,
  33. BOOL bInheritHandle = FALSE,
  34. DWORD dwDesiredAccess = MUTEX_ALL_ACCESS);
  35. // release a lock on a mutex...
  36. BOOL Release(void);
  37. };
  38. #endif