diff --git a/dlls/wintrust/register.c b/dlls/wintrust/register.c index 517359f8c78..6d425c86c02 100644 --- a/dlls/wintrust/register.c +++ b/dlls/wintrust/register.c @@ -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.@) */ diff --git a/dlls/wintrust/wintrust_main.c b/dlls/wintrust/wintrust_main.c index 5e025d9da48..4b0c8ffdb6f 100644 --- a/dlls/wintrust/wintrust_main.c +++ b/dlls/wintrust/wintrust_main.c @@ -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); +} diff --git a/dlls/wintrust/wintrust_priv.h b/dlls/wintrust/wintrust_priv.h new file mode 100644 index 00000000000..dc6a8734048 --- /dev/null +++ b/dlls/wintrust/wintrust_priv.h @@ -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__ */