| 505 | } |
| 506 | |
| 507 | bool EnumSystemNotify(PEX_CALLBACK callback,ULONG count,KernelCallbackInfo* info) { |
| 508 | if (!callback) |
| 509 | return false; |
| 510 | |
| 511 | KdPrint(("Count: %d\n", count)); |
| 512 | |
| 513 | #ifdef _WIN64 |
| 514 | static ULONG Max = 64; |
| 515 | #else |
| 516 | static ULONG Max = 8; |
| 517 | #endif |
| 518 | |
| 519 | int j = 0; |
| 520 | for (ULONG i = 0; i < Max; i++) { |
| 521 | if (j == count) |
| 522 | break; |
| 523 | if (!MmIsAddressValid(callback)) |
| 524 | break; |
| 525 | auto block = ExReferenceCallBackBlock(callback); |
| 526 | if (block != nullptr) { |
| 527 | KdPrint(("SystemNotifyFunc: 0x%p\n", (ULONG64)block->Function)); |
| 528 | info->Address[j] = block->Function; |
| 529 | ExDereferenceCallBackBlock(callback, block); |
| 530 | ++j; |
| 531 | } |
| 532 | callback++; |
| 533 | } |
| 534 | return true; |
| 535 | } |
| 536 | |
| 537 | |
| 538 |
no test coverage detected