Exemplo n.º 1
0
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//agenttype_mixer_destroy
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int agenttype_mixer_destroy(agent *a)
{
	if (a->agentdetails)
	{
		//Get the details
		agenttype_mixer_details *details = (agenttype_mixer_details *) a->agentdetails;

		//Close the window
		if (details->hwnd_reciever) window_helper_destroy(details->hwnd_reciever);
		details->hwnd_reciever = NULL;

		//Close the mixer
		mixerClose(details->mixer_handle);

		//Delete the details
		delete details;
		a->agentdetails = NULL;
	}

	//Destroy the window if necessary
	mixer_controlcount--;
	if (mixer_controlcount < 1 && mixer_recieverregistered)
	{
		window_helper_unregister(mixer_recieverclass);
		mixer_recieverregistered = false;
	}

	//No errors
	return 0;
}
Exemplo n.º 2
0
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//message_shutdown
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int message_shutdown()
{
    // Destroy the hwnd...
    window_helper_destroy(message_window);
    message_window = NULL;

    //Unregister the class
    window_helper_unregister(szMessageMasterName);

    //No errors
    return 0;
}
Exemplo n.º 3
0
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//agenttype_winamp_shutdown
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int agenttype_winamp_shutdown()
{
	//Destroy the internal tracking list
	if (agenttype_winamp_agents) list_destroy(agenttype_winamp_agents);

	//Destroy the window
	if (agenttype_winamp_window) window_helper_destroy(agenttype_winamp_window);

	//Unregister the window class
	if (agenttype_winamp_windowclassregistered) window_helper_unregister(agenttype_winamp_timerclass);

	//No errors
	return 0;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//agenttype_diskspacemonitor_shutdown
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int agenttype_diskspacemonitor_shutdown()
{
	if(agenttype_diskspacemonitor_hastimer){
		agenttype_diskspacemonitor_hastimer = false;
		KillTimer(agenttype_diskspacemonitor_window, 0);
	}
	//Destroy the internal tracking list
	if (agenttype_diskspacemonitor_agents) list_destroy(agenttype_diskspacemonitor_agents);
	//Destroy the window
	if (agenttype_diskspacemonitor_window) window_helper_destroy(agenttype_diskspacemonitor_window);

	//Unregister the window class
	if (agenttype_diskspacemonitor_windowclassregistered) window_helper_unregister(agenttype_diskspacemonitor_timerclass);

	//No errors
	return 0;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//agenttype_systemmonitor_shutdown
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int agenttype_systemmonitor_shutdown()
{
	//Destroy the internal tracking list
	if (agenttype_systemmonitor_agents) list_destroy(agenttype_systemmonitor_agents);

	//Destroy the window
	if (agenttype_systemmonitor_window) window_helper_destroy(agenttype_systemmonitor_window);

	//Unregister the window class
	if (agenttype_systemmonitor_windowclassregistered) window_helper_unregister(agenttype_systemmonitor_timerclass);

	//If we have the library, free it
	if (agenttype_systemmonitor_ntdllmodule != NULL)
	{
		FreeLibrary(agenttype_systemmonitor_ntdllmodule);
	}

	//No errors
	return 0;
}
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
//agenttype_mixer_destroy
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
int agenttype_mixer_destroy_xp (agent * a)
{
	if (a->agentdetails)
	{
		AgentType_Mixer_XP * details = static_cast<AgentType_Mixer_XP *>(a->agentdetails);
		details->Destroy();
		delete details;
		a->agentdetails = NULL;
	}

	//Destroy the window if necessary
	s_mixer_controlcount--;
	if (s_mixer_controlcount < 1 && mixer_recieverregistered)
	{
		window_helper_unregister(mixer_recieverclass);
		mixer_recieverregistered = false;
	}

	//No errors
	return 0;
}