2 * Win32 winedbgc functions
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22 //#include <wine/debugtools.h>
30 #include "wine/port.h"
38 #include "wine/debug.h"
39 #include "wine/library.h"
41 #include "proxywinedbgc.h"
43 WINE_DEFAULT_DEBUG_CHANNEL(winedbgc);
46 /***********************************************************************
47 * DllMain [Internal] Initializes the internal 'winedbgc32.DLL'.
50 * hinstDLL [I] handle to the DLL's instance
52 * lpvReserved [I] reserved, must be NULL
59 BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
61 // TRACE("Initializing or Finalizing winedbgc: %p,%lx,%p\n", hinstDLL, fdwReason, lpvReserved);
62 if (fdwReason == DLL_PROCESS_ATTACH)
64 // TRACE("Loading winedbgc...\n");
67 if (winedbgc_LoadDriverManager())
68 winedbgc_LoadDMFunctions();
72 else if (fdwReason == DLL_PROCESS_DETACH)
74 // TRACE("Unloading winedbgc...\n");
77 if (gProxyHandle.bFunctionReady)
80 for ( i = 0; i < NUM_SQLFUNC; i ++ )
82 gProxyHandle.functions[i].func = SQLDummyFunc;
85 if (gProxyHandle.dmHandle)
87 wine_dlclose(gProxyHandle.dmHandle,NULL,0);
88 gProxyHandle.dmHandle = NULL;