lms-video/pd-0.44-2/portmidi/pm_win/pmdll.c
Santi Noreña e85d191b46 - Reestructuración de ficheros y directorios general
- merge v0.01 --> Añadido fileselector
- Añadidas fuentes de Gem y Pure Data
- pix2jpg incluído en Gem. Archivos de construcción de Gem modificados.
- Añadido fichero ompiling.txt con instrucciones de compilación
2013-02-04 18:00:17 +01:00

49 lines
988 B
C
Executable file

/*
====================================================================
DLL to perform action when program shuts down
====================================================================
*/
#include "windows.h"
#include "pmdll.h"
static close_fn_ptr_type close_function = NULL;
DLL_EXPORT pm_set_close_function(close_fn_ptr_type close_fn_ptr)
{
close_function = close_fn_ptr;
}
static void Initialize( void ) {
return;
}
static void Terminate( void ) {
if (close_function) {
(*close_function)();
}
}
BOOL WINAPI DllMain(HINSTANCE hinstDLL, //DLL module handle
DWORD fdwReason, //for calling function
LPVOID lbpvReserved)//reserved
{
switch(fdwReason) {
case DLL_PROCESS_ATTACH:
/* when DLL starts, run this */
Initialize();
break;
case DLL_PROCESS_DETACH:
/* when DLL ends, this run (note: verified this run */
Terminate();
break;
default:
break;
}
return TRUE;
}