mpr_main.c 1.19 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
/*
 * MPR undocumented functions
 */

#include "winbase.h"
#include "winnetwk.h"
#include "heap.h"
#include "debugtools.h"

DEFAULT_DEBUG_CHANNEL(mpr)

 /* 
  * FIXME: The following routines should use a private heap ...
  */

/*****************************************************************
 *  MPR_Alloc  [MPR.22]
 */
LPVOID WINAPI MPR_Alloc( DWORD dwSize )
{
21
    return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
22 23 24 25 26 27 28 29
}

/*****************************************************************
 *  MPR_ReAlloc  [MPR.23]
 */
LPVOID WINAPI MPR_ReAlloc( LPVOID lpSrc, DWORD dwSize )
{
    if ( lpSrc )
30
        return HeapReAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, lpSrc, dwSize );
31
    else
32
        return HeapAlloc( GetProcessHeap(), HEAP_ZERO_MEMORY, dwSize );
33 34 35 36 37 38 39 40
}

/*****************************************************************
 *  MPR_Free  [MPR.24]
 */
BOOL WINAPI MPR_Free( LPVOID lpMem )
{
    if ( lpMem )
41
        return HeapFree( GetProcessHeap(), 0, lpMem );
42 43 44 45 46
    else
        return FALSE;
}

/*****************************************************************
47
 *  _MPR_25  [MPR.25]
48 49 50 51 52 53 54 55
 */
BOOL WINAPI _MPR_25( LPBYTE lpMem, INT len )
{
    FIXME( "(%p, %d): stub\n", lpMem, len );

    return FALSE;
}