2007-10-08 19:38:06 +02:00
|
|
|
/*
|
2007-12-06 02:23:41 +01:00
|
|
|
* Main DLL interface to Queue Manager (BITS)
|
2007-10-08 19:38:06 +02:00
|
|
|
*
|
|
|
|
* Background Intelligent Transfer Service (BITS) interface. Dll is named
|
|
|
|
* qmgr for backwards compatibility with early versions of BITS.
|
|
|
|
*
|
|
|
|
* Copyright 2007 Google (Roy Shea)
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License as published by the Free Software Foundation; either
|
|
|
|
* version 2.1 of the License, or (at your option) any later version.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
|
|
|
*/
|
|
|
|
|
2008-02-11 20:09:02 +01:00
|
|
|
#include <stdio.h>
|
2007-10-08 19:38:06 +02:00
|
|
|
|
2015-06-05 10:33:53 +02:00
|
|
|
#define COBJMACROS
|
2008-02-11 20:09:02 +01:00
|
|
|
#include "objbase.h"
|
|
|
|
#include "winuser.h"
|
|
|
|
#include "winreg.h"
|
|
|
|
#include "advpub.h"
|
|
|
|
#include "olectl.h"
|
2014-05-01 13:48:00 +02:00
|
|
|
#include "rpcproxy.h"
|
2008-02-11 20:09:02 +01:00
|
|
|
#include "winsvc.h"
|
|
|
|
#include "qmgr.h"
|
2007-12-06 02:23:41 +01:00
|
|
|
|
2007-10-08 19:38:06 +02:00
|
|
|
#include "wine/debug.h"
|
|
|
|
|
2007-12-06 02:23:41 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(qmgr);
|
2007-10-08 19:38:06 +02:00
|
|
|
|
2008-02-11 20:09:02 +01:00
|
|
|
/* Handle to the base address of this DLL */
|
|
|
|
static HINSTANCE hInst;
|
|
|
|
|
2007-12-06 02:23:41 +01:00
|
|
|
/* Entry point for DLL */
|
2007-10-08 19:38:06 +02:00
|
|
|
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
|
|
{
|
|
|
|
TRACE("(%p, %d, %p)\n", hinstDLL, fdwReason, lpvReserved);
|
|
|
|
|
|
|
|
switch (fdwReason)
|
|
|
|
{
|
2007-12-06 02:23:41 +01:00
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
DisableThreadLibraryCalls(hinstDLL);
|
2008-02-11 20:09:02 +01:00
|
|
|
hInst = hinstDLL;
|
2007-12-06 02:23:41 +01:00
|
|
|
break;
|
2007-10-08 19:38:06 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
return TRUE;
|
|
|
|
}
|
2008-02-11 20:09:02 +01:00
|
|
|
|
|
|
|
HRESULT WINAPI DllRegisterServer(void)
|
|
|
|
{
|
2014-05-01 13:48:00 +02:00
|
|
|
return __wine_register_resources(hInst);
|
2008-02-11 20:09:02 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
HRESULT WINAPI DllUnregisterServer(void)
|
|
|
|
{
|
2014-05-01 13:48:00 +02:00
|
|
|
return __wine_unregister_resources(hInst);
|
2008-02-11 20:09:02 +01:00
|
|
|
}
|