Beispiel #1
0
ULONG 
kMessageBox (
	PUNICODE_STRING Message,
	PUNICODE_STRING Caption,
	ULONG ResponseOption,
	ULONG Type
	) 
{
	NTSTATUS		Status; 
	PVOID Parameters[] = {
		Message,
		Caption,
		(PVOID)(ResponseOption|Type), 
		0 
	}; 

	ULONG Response = 0; 

	Status = ExRaiseHardError ( 
		STATUS_SERVICE_NOTIFICATION|0x10000000, 
		3, // Number of parameters
		3, // Parameter mask -- first two are pointers
		&Parameters, 
		ResponseOption, 
		&Response 
		); 
	if (!NT_SUCCESS(Status)) {
		KdPrint(("SYS:kMessageBox:ExRaiseHardError Failed!0x08x\n", Status));
	}
	return Response; 
}
Beispiel #2
0
VOID
CmpRaiseSelfHealWarningWorker(
    IN PVOID Arg
    )
{
    PVOID                               ErrorParameters;
    ULONG                               ErrorResponse;
    PCM_SELF_HEAL_WORK_ITEM_PARAMETER   Param;

    Param = (PCM_SELF_HEAL_WORK_ITEM_PARAMETER)Arg;
    ErrorParameters = &(Param->HiveName);
    ExRaiseHardError(
        STATUS_REGISTRY_HIVE_RECOVERED,
        1,
        1,
        (PULONG_PTR)&ErrorParameters,
        OptionOk,
        &ErrorResponse
        );

    //
    // free what we have allocated
    //
    ExFreePool(Param->WorkItem);
    ExFreePool(Param);
	
	//
	// see if there are other self heal warnings to be posted.
	//
	LOCK_SELF_HEAL_QUEUE();
	CmpSelfHealWorkerActive = FALSE;
	if( IsListEmpty(&CmpSelfHealQueueListHead) == FALSE ) {
		//
		// remove head and queue it.
		//
        Param = (PCM_SELF_HEAL_WORK_ITEM_PARAMETER)RemoveHeadList(&CmpSelfHealQueueListHead);
        Param = CONTAINING_RECORD(
                        Param,
                        CM_SELF_HEAL_WORK_ITEM_PARAMETER,
                        SelfHealQueueListEntry
                        );
		ExQueueWorkItem(Param->WorkItem, DelayedWorkQueue);
		CmpSelfHealWorkerActive = TRUE;
	} 
	UNLOCK_SELF_HEAL_QUEUE();
}
Beispiel #3
0
VOID
CmpQuotaWarningWorker(
    IN PVOID WorkItem
)

/*++

Routine Description:

    Displays hard error popup that indicates the registry quota is
    running out.

Arguments:

    WorkItem - Supplies pointer to the work item. This routine will
               free the work item.

Return Value:

    None.

--*/

{
    NTSTATUS Status;
    ULONG Response;

    ExFreePool(WorkItem);

    Status = ExRaiseHardError(STATUS_REGISTRY_QUOTA_LIMIT,
                              0,
                              0,
                              NULL,
                              OptionOk,
                              &Response);
}