1999-08-07 14:32:33 +00:00
|
|
|
/*
|
|
|
|
* MPR undocumented functions
|
2002-03-09 23:29:33 +00: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 14:32:33 +00:00
|
|
|
*/
|
|
|
|
|
2003-09-05 23:08:26 +00:00
|
|
|
#include <stdarg.h>
|
|
|
|
|
|
|
|
#include "windef.h"
|
1999-08-07 14:32:33 +00:00
|
|
|
#include "winbase.h"
|
|
|
|
#include "winnetwk.h"
|
2002-03-09 23:29:33 +00:00
|
|
|
#include "wine/debug.h"
|
2004-04-05 23:14:26 +00:00
|
|
|
#include "wnetpriv.h"
|
1999-08-07 14:32:33 +00:00
|
|
|
|
2002-03-09 23:29:33 +00:00
|
|
|
WINE_DEFAULT_DEBUG_CHANNEL(mpr);
|
1999-08-07 14:32:33 +00:00
|
|
|
|
2002-05-31 23:06:46 +00:00
|
|
|
/*
|
1999-08-07 14:32:33 +00:00
|
|
|
* FIXME: The following routines should use a private heap ...
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* @ [MPR.22]
|
1999-08-07 14:32:33 +00:00
|
|
|
*/
|
|
|
|
LPVOID WINAPI MPR_Alloc( DWORD dwSize )
|
|
|
|
{
|
2000-02-16 22:47:24 +00:00
|
|
|
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
|
1999-08-07 14:32:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* @ [MPR.23]
|
1999-08-07 14:32:33 +00:00
|
|
|
*/
|
|
|
|
LPVOID WINAPI MPR_ReAlloc( LPVOID lpSrc, DWORD dwSize )
|
|
|
|
{
|
|
|
|
if ( lpSrc )
|
2000-02-16 22:47:24 +00:00
|
|
|
return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, lpSrc, dwSize );
|
1999-08-07 14:32:33 +00:00
|
|
|
else
|
2000-02-16 22:47:24 +00:00
|
|
|
return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
|
1999-08-07 14:32:33 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* @ [MPR.24]
|
1999-08-07 14:32:33 +00:00
|
|
|
*/
|
|
|
|
BOOL WINAPI MPR_Free( LPVOID lpMem )
|
|
|
|
{
|
|
|
|
if ( lpMem )
|
2000-02-16 22:47:24 +00:00
|
|
|
return HeapFree( GetProcessHeap(), 0, lpMem );
|
1999-08-07 14:32:33 +00:00
|
|
|
else
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
/*****************************************************************
|
2001-07-02 19:59:40 +00:00
|
|
|
* @ [MPR.25]
|
1999-08-07 14:32:33 +00:00
|
|
|
*/
|
|
|
|
BOOL WINAPI _MPR_25( LPBYTE lpMem, INT len )
|
|
|
|
{
|
|
|
|
FIXME( "(%p, %d): stub\n", lpMem, len );
|
|
|
|
|
|
|
|
return FALSE;
|
|
|
|
}
|
|
|
|
|
2003-05-12 03:28:54 +00:00
|
|
|
/*****************************************************************
|
|
|
|
* DllCanUnloadNow [MPR.@]
|
|
|
|
*/
|
|
|
|
DWORD WINAPI DllCanUnloadNow(void)
|
|
|
|
{
|
|
|
|
FIXME("Stub\n");
|
|
|
|
return S_OK;
|
|
|
|
}
|
2004-04-05 23:14:26 +00:00
|
|
|
|
2004-05-17 21:08:31 +00:00
|
|
|
/*****************************************************************
|
|
|
|
* DllMain [MPR.init]
|
|
|
|
*/
|
2004-04-05 23:14:26 +00: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;
|
|
|
|
}
|