Module: wine
Branch: master
Commit: 6f8b296fb18d904ea5f064dd4209df7bdfcebed9
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6f8b296fb18d904ea5f064dd4…
Author: Juan Lang <juan.lang(a)gmail.com>
Date: Mon Aug 27 16:19:36 2007 -0700
wintrust: Move mem alloc functions to wintrust_main.c.
---
dlls/wintrust/register.c | 12 +-----------
dlls/wintrust/wintrust_main.c | 18 +++++++++++++++++-
dlls/wintrust/wintrust_priv.h | 25 +++++++++++++++++++++++++
3 files changed, 43 insertions(+), 12 deletions(-)
diff --git a/dlls/wintrust/register.c b/dlls/wintrust/register.c
index 517359f..6d425c8 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 5e025d9..4b0c8ff 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 0000000..dc6a873
--- /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__ */