| 398 | |
| 399 | |
| 400 | UINT 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 | |
| 418 | BOOL CCryptPropertySheet::PreTranslateMessage(MSG* pMsg) |