remlock.h

来自「intel xscale pxa270的完整wince4.2 BSP包」· C头文件 代码 · 共 86 行

H
86
字号
//
// Copyright (c) Microsoft Corporation.  All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/*++


Module Name:

    remlock.h

Abstract:

    Simple RemoveLock

Notes:

    Simple RemoveLock definitions made to mimic the Win2k IoXxxRemoveLock functions.
    See the Win2k DDK for descriptions.
    
Revision History:

--*/

#if !defined( _REMLOCK_ )
#define _REMLOCK_

#include <windows.h>

#include "warning.h"

#if !defined(STATUS_DELETE_PENDING)
//
// MessageId: STATUS_DELETE_PENDING
//
// MessageText:
//
//  A non close operation has been requested of a file object with a
//  delete pending.
//
#define STATUS_DELETE_PENDING            ((LONG)0xC0000056L)
#endif


typedef struct _REMOVE_LOCK 
{   
    BOOL Removed;
    LONG    IoCount;
    HANDLE  RemoveEvent;

} REMOVE_LOCK, *PREMOVE_LOCK;

BOOL
InitializeRemoveLock(
    IN PREMOVE_LOCK Lock
    );

DWORD
AcquireRemoveLock(
    IN PREMOVE_LOCK Lock,
    IN OPTIONAL PVOID Tag
    );

VOID
ReleaseRemoveLock(
    IN PREMOVE_LOCK Lock,
    IN OPTIONAL PVOID Tag
    );
  
VOID
ReleaseRemoveLockAndWait(
    IN PREMOVE_LOCK Lock,
    IN OPTIONAL PVOID Tag
    );


#endif // _REMLOCK_

//EOF

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?