/*****************************************************************************1* x264dll: x264 DLLMain for win322*****************************************************************************3* Copyright (C) 2009-2016 x264 project4*5* Authors: Anton Mitrofanov <[email protected]>6*7* This program is free software; you can redistribute it and/or modify8* it under the terms of the GNU General Public License as published by9* the Free Software Foundation; either version 2 of the License, or10* (at your option) any later version.11*12* This program is distributed in the hope that it will be useful,13* but WITHOUT ANY WARRANTY; without even the implied warranty of14* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the15* GNU General Public License for more details.16*17* You should have received a copy of the GNU General Public License18* along with this program; if not, write to the Free Software19* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111, USA.20*21* This program is also available under a commercial proprietary license.22* For more information, contact us at [email protected].23*****************************************************************************/2425#include "common/common.h"26#include <windows.h>2728/* Callback for our DLL so we can initialize pthread */29BOOL WINAPI DllMain( HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved )30{31#if PTW32_STATIC_LIB32switch( fdwReason )33{34case DLL_PROCESS_ATTACH:35pthread_win32_process_attach_np();3637case DLL_THREAD_ATTACH:38pthread_win32_thread_attach_np();39break;4041case DLL_THREAD_DETACH:42pthread_win32_thread_detach_np();43break;4445case DLL_PROCESS_DETACH:46pthread_win32_thread_detach_np();47pthread_win32_process_detach_np();48break;49}50#endif5152return TRUE;53}545556