MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / OnPowerBroadcast

Method OnPowerBroadcast

cppcryptfs/ui/CryptPropertySheet.cpp:400–415  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

398
399
400UINT CCryptPropertySheet::OnPowerBroadcast(UINT nPowerEvent, LPARAM nEventData)
401{
402 if (nPowerEvent == PBT_APMSUSPEND) {
403#ifdef _DEBUG
404 OutputDebugStringA("disabling key cache on suspend\n");
405#endif
406 KeyCache::GetInstance()->Disable();
407 } else if (nPowerEvent == PBT_APMRESUMEAUTOMATIC ||
408 nPowerEvent == PBT_APMRESUMESUSPEND) {
409#ifdef _DEBUG
410 OutputDebugStringA("enabling key cache on resume\n");
411#endif
412 KeyCache::GetInstance()->Enable();
413 }
414 return CPropertySheet::OnPowerBroadcast(nPowerEvent, nEventData);
415}
416
417
418BOOL CCryptPropertySheet::PreTranslateMessage(MSG* pMsg)

Callers

nothing calls this directly

Calls 2

DisableMethod · 0.80
EnableMethod · 0.80

Tested by

no test coverage detected