1999-08-07 16:32:33 +02:00
|
|
|
/*
|
|
|
|
* MPR undocumented functions
|
2002-03-10 00:29:33 +01:00
|
|
|
*
|
|
|
|
* Copyright 1999 Ulrich Weigand
|
|
|
|
*
|
|
|
|
* 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
|
2006-05-18 14:49:52 +02:00
|
|
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
|
2003-09-06 01:08:26 +02:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "windef.h"
|
1999-08-07 16:32:33 +02:00
|
|
|
#include "winbase.h"
|
2005-12-09 11:51:17 +01:00
|
|
|
#include "objbase.h"
|
1999-08-07 16:32:33 +02:00
|
|
|
#include "winnetwk.h"
|
2002-03-10 00:29:33 +01:00
|
|
|
#include "wine/debug.h"
|
2004-04-06 01:14:26 +02:00
|
|
|
#include "wnetpriv.h"
|
1999-08-07 16:32:33 +02:00
|
|
|
|
2002-03-10 00:29:33 +01:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mpr);
|
1999-08-07 16:32:33 +02:00
|
|
|
|
2002-06-01 01:06:46 +02:00
|
|
|
/*
|
1999-08-07 16:32:33 +02:00
|
|
|
* FIXME: The following routines should use a private heap ...
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [MPR.22]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
LPVOID WINAPI MPR_Alloc( DWORD dwSize )
|
|
|
|
{
|
2000-02-16 23:47:24 +01:00
|
|
|
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
|
1999-08-07 16:32:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [MPR.23]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
LPVOID WINAPI MPR_ReAlloc( LPVOID lpSrc, DWORD dwSize )
|
|
|
|
{
|
|
|
|
if ( lpSrc )
|
2000-02-16 23:47:24 +01:00
|
|
|
return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, lpSrc, dwSize );
|
1999-08-07 16:32:33 +02:00
|
|
|
else
|
2000-02-16 23:47:24 +01:00
|
|
|
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
|
1999-08-07 16:32:33 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [MPR.24]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
BOOL WINAPI MPR_Free( LPVOID lpMem )
|
|
|
|
{
|
|
|
|
if ( lpMem )
|
2000-02-16 23:47:24 +01:00
|
|
|
return HeapFree( GetProcessHeap(), 0, lpMem );
|
1999-08-07 16:32:33 +02:00
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 21:59:40 +02:00
|
|
|
* @ [MPR.25]
|
1999-08-07 16:32:33 +02:00
|
|
|
*/
|
|
|
|
BOOL WINAPI _MPR_25( LPBYTE lpMem, INT len )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %d): stub\n", lpMem, len );
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2004-05-17 23:08:31 +02:00
|
|
|
/*****************************************************************
|
|
|
|
* DllMain [MPR.init]
|
|
|
|
*/
|
2004-04-06 01:14:26 +02:00
|
|
|
BOOL WINAPI DllMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
|
|
|
|
{
|
|
|
|
switch (fdwReason) {
|
|
|
|
case DLL_PROCESS_ATTACH:
|
|
|
|
DisableThreadLibraryCalls( hinstDLL );
|
|
|
|
wnetInit(hinstDLL);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case DLL_PROCESS_DETACH:
|
2013-05-15 10:22:01 +02:00
|
|
|
if (lpvReserved) break;
|
2004-04-06 01:14:26 +02:00
|
|
|
wnetFree();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|