Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code

Unified Diff: src/installer-ca/dutil/memutil.h

Issue 11521026: initial custom action library, "hello, world" quality (Closed)
Patch Set: Created Sept. 3, 2013, 12:48 p.m.
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/installer-ca/dutil/memutil.h
===================================================================
new file mode 100644
--- /dev/null
+++ b/src/installer-ca/dutil/memutil.h
@@ -0,0 +1,45 @@
+#pragma once
+//-------------------------------------------------------------------------------------------------
+// <copyright file="memutil.h" company="Outercurve Foundation">
+// Copyright (c) 2004, Outercurve Foundation.
+// This software is released under Microsoft Reciprocal License (MS-RL).
+// The license and further copyright text can be found in the file
+// LICENSE.TXT at the root directory of the distribution.
+// </copyright>
+//
+// <summary>
+// Header for memory helper functions.
+// </summary>
+//-------------------------------------------------------------------------------------------------
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#define ReleaseMem(p) if (p) { MemFree(p); }
+#define ReleaseNullMem(p) if (p) { MemFree(p); p = NULL; }
+
+HRESULT DAPI MemInitialize();
+void DAPI MemUninitialize();
+
+LPVOID DAPI MemAlloc(
+ __in SIZE_T cbSize,
+ __in BOOL fZero
+ );
+LPVOID DAPI MemReAlloc(
+ __in LPVOID pv,
+ __in SIZE_T cbSize,
+ __in BOOL fZero
+ );
+
+HRESULT DAPI MemFree(
+ __in LPVOID pv
+ );
+SIZE_T DAPI MemSize(
+ __in LPCVOID pv
+ );
+
+#ifdef __cplusplus
+}
+#endif
+

Powered by Google App Engine
This is Rietveld