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
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 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"
|
|
|
|
#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;
|
|
|
|
}
|
|
|
|
|
2003-05-12 05:28:54 +02:00
|
|
|
/*****************************************************************
|
|
|
|
* DllCanUnloadNow [MPR.@]
|
|
|
|
*/
|
2005-09-08 13:01:27 +02:00
|
|
|
HRESULT WINAPI DllCanUnloadNow(void)
|
2003-05-12 05:28:54 +02:00
|
|
|
{
|
|
|
|
FIXME("Stub\n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
2004-04-06 01:14:26 +02:00
|
|
|
|
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:
|
|
|
|
wnetFree();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return TRUE;
|
|
|
|
}
|