Esempio n. 1
0
HRESULT MqiMessageQueueUninstall(
    MQI_MESSAGE_QUEUE_LIST* pList,
    BOOL fRollback,
    LPWSTR* ppwzActionData
    )
{
    HRESULT hr = S_OK;

    // add count to action data
    hr = WcaWriteIntegerToCaData(pList->iUninstallCount, ppwzActionData);
    ExitOnFailure(hr, "Failed to add count to custom action data");

    for (MQI_MESSAGE_QUEUE* pItm = pList->pFirst; pItm; pItm = pItm->pNext)
    {
        // queues that are being uninstalled only
        if (!WcaIsUninstalling(pItm->isInstalled, pItm->isAction))
            continue;

        // if we did not create the queue we should not try to delete it
        if (pItm->fExists && fRollback)
        {
            continue;
        }

        // add message queue to action data
        hr = AddMessageQueueToActionData(pItm, ppwzActionData);
        ExitOnFailure(hr, "Failed to add message queue to action data");
    }

    hr = S_OK;

LExit:
    return hr;
}
Esempio n. 2
0
HRESULT MqiMessageQueueInstall(
	MQI_MESSAGE_QUEUE_LIST* pList,
	LPWSTR* ppwzActionData
	)
{
	HRESULT hr = S_OK;

	// add count to action data
	hr = WcaWriteIntegerToCaData(pList->iInstallCount, ppwzActionData);
	ExitOnFailure(hr, "Failed to add count to custom action data");

	for (MQI_MESSAGE_QUEUE* pItm = pList->pFirst; pItm; pItm = pItm->pNext)
	{
		// queues that are being installed only
		if (!WcaIsInstalling(pItm->isInstalled, pItm->isAction))
			continue;

		// add message queue to action data
		hr = AddMessageQueueToActionData(pItm, ppwzActionData);
		ExitOnFailure(hr, "Failed to add message queue to action data");
	}

	hr = S_OK;

LExit:
	return hr;
}