Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmscms_main.c
Go to the documentation of this file.
00001 /* 00002 * MSCMS - Color Management System for Wine 00003 * 00004 * Copyright 2004, 2005 Hans Leidekker 00005 * 00006 * This library is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Lesser General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2.1 of the License, or (at your option) any later version. 00010 * 00011 * This library is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00014 * Lesser General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU Lesser General Public 00017 * License along with this library; if not, write to the Free Software 00018 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA 00019 */ 00020 00021 #include "config.h" 00022 00023 #include "wine/port.h" 00024 #include "wine/debug.h" 00025 #include "wine/library.h" 00026 00027 #include <stdarg.h> 00028 00029 #include "windef.h" 00030 #include "winbase.h" 00031 #include "wingdi.h" 00032 #include "winuser.h" 00033 #include "icm.h" 00034 00035 #include "mscms_priv.h" 00036 00037 WINE_DEFAULT_DEBUG_CHANNEL(mscms); 00038 00039 #ifdef HAVE_LCMS 00040 static int lcms_error_handler( int error, const char *text ) 00041 { 00042 switch (error) 00043 { 00044 case LCMS_ERRC_WARNING: 00045 case LCMS_ERRC_RECOVERABLE: 00046 case LCMS_ERRC_ABORTED: 00047 WARN("%d %s\n", error, debugstr_a(text)); 00048 return 1; 00049 default: 00050 ERR("unknown error %d %s\n", error, debugstr_a(text)); 00051 return 0; 00052 } 00053 } 00054 #endif 00055 00056 BOOL WINAPI DllMain( HINSTANCE hinst, DWORD reason, LPVOID reserved ) 00057 { 00058 TRACE( "(%p, %d, %p)\n", hinst, reason, reserved ); 00059 00060 switch (reason) 00061 { 00062 case DLL_PROCESS_ATTACH: 00063 DisableThreadLibraryCalls( hinst ); 00064 #ifdef HAVE_LCMS 00065 cmsSetErrorHandler( lcms_error_handler ); 00066 #endif 00067 break; 00068 case DLL_PROCESS_DETACH: 00069 #ifdef HAVE_LCMS 00070 free_handle_tables(); 00071 #endif 00072 break; 00073 } 00074 return TRUE; 00075 } Generated on Sat May 26 2012 04:23:20 for ReactOS by
1.7.6.1
|