wintrust: Move mem alloc functions to wintrust_main.c.

This commit is contained in:
Juan Lang 2007-08-27 16:19:36 -07:00 committed by Alexandre Julliard
parent 92de438469
commit 6f8b296fb1
3 changed files with 43 additions and 12 deletions

View file

@ -31,7 +31,7 @@
#include "wintrust.h"
#include "softpub.h"
#include "mssip.h"
#include "wintrust_priv.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
@ -812,16 +812,6 @@ error_close_key:
return Func;
}
static void * WINAPI WINTRUST_Alloc(DWORD cb)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cb);
}
static void WINAPI WINTRUST_Free(void *p)
{
HeapFree(GetProcessHeap(), 0, p);
}
/***********************************************************************
* WintrustLoadFunctionPointers (WINTRUST.@)
*/

View file

@ -29,7 +29,7 @@
#include "softpub.h"
#include "mscat.h"
#include "objbase.h"
#include "wintrust_priv.h"
#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(wintrust);
@ -214,3 +214,19 @@ BOOL WINAPI WintrustSetRegPolicyFlags( DWORD dwPolicyFlags)
if (r) SetLastError(r);
return r == ERROR_SUCCESS;
}
/* Utility functions */
void * WINAPI WINTRUST_Alloc(DWORD cb)
{
return HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, cb);
}
void * WINAPI WINTRUST_ReAlloc(void *ptr, DWORD cb)
{
return HeapReAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, ptr, cb);
}
void WINAPI WINTRUST_Free(void *p)
{
HeapFree(GetProcessHeap(), 0, p);
}

View file

@ -0,0 +1,25 @@
/*
* Copyright 2007 Juan Lang
*
* 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
*/
#ifndef __WINTRUST_PRIV_H__
#define __WINTRUST_PRIV_H__
void * WINAPI WINTRUST_Alloc(DWORD cb);
void * WINAPI WINTRUST_ReAlloc(void *ptr, DWORD cb);
void WINAPI WINTRUST_Free(void *p);
#endif /* ndef __WINTRUST_PRIV_H__ */