📄 cdiskinactivityimp.cpp
字号:
/*____________________________________________________________________________
Copyright (C) 2002 PGP Corporation
All rights reserved.
$Id: CDiskInactivityImp.cpp,v 1.2 2002/08/06 20:09:34 dallen Exp $
____________________________________________________________________________*/
#include "pgpClassesConfig.h"
#include "CDiskInactivityImp.h"
_USING_PGP
// Class CDiskInactivityImp member functions
CComboError
CDiskInactivityImp::CreateInactivityTimer(
PGPUInt32 seconds,
PGPBoolean repeating,
CDiskInactivity::InactivityCallbackFunc pfnCallback,
ULONG userVal,
PGPUInt32& timerID)
{
CComboError error;
error = AttachToDriver();
if (error.IsntError())
{
PGPINACTIVITYSTRUCT pgpIS;
pgpClearMemory(&pgpIS, sizeof(pgpIS));
pgpIS.ulOperation = kPGPUDOperation_CreateInactivityTimer;
pgpIS.ulSeconds = seconds;
pgpIS.callback = pfnCallback;
pgpIS.ulUserValue = userVal;
if (repeating)
pgpIS.ulFlags |= kPGPUDFlag_RepeatingInactivityTimer;
error = SendInactivityCommand(pgpIS);
if (error.IsntError())
timerID = pgpIS.ulTimerHandle;
}
return error;
}
CComboError
CDiskInactivityImp::DestroyInactivityTimer(PGPUInt32 timerID)
{
CComboError error;
PGPINACTIVITYSTRUCT pgpIS;
pgpClearMemory(&pgpIS, sizeof(pgpIS));
pgpIS.ulOperation = kPGPUDOperation_DestroyInactivityTimer;
pgpIS.ulTimerHandle = timerID;
error = SendInactivityCommand(pgpIS);
return error;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -