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

Side by Side 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.
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 #pragma once
2 //------------------------------------------------------------------------------ -------------------
3 // <copyright file="memutil.h" company="Outercurve Foundation">
4 // Copyright (c) 2004, Outercurve Foundation.
5 // This software is released under Microsoft Reciprocal License (MS-RL).
6 // The license and further copyright text can be found in the file
7 // LICENSE.TXT at the root directory of the distribution.
8 // </copyright>
9 //
10 // <summary>
11 // Header for memory helper functions.
12 // </summary>
13 //------------------------------------------------------------------------------ -------------------
14
15 #ifdef __cplusplus
16 extern "C" {
17 #endif
18
19 #define ReleaseMem(p) if (p) { MemFree(p); }
20 #define ReleaseNullMem(p) if (p) { MemFree(p); p = NULL; }
21
22 HRESULT DAPI MemInitialize();
23 void DAPI MemUninitialize();
24
25 LPVOID DAPI MemAlloc(
26 __in SIZE_T cbSize,
27 __in BOOL fZero
28 );
29 LPVOID DAPI MemReAlloc(
30 __in LPVOID pv,
31 __in SIZE_T cbSize,
32 __in BOOL fZero
33 );
34
35 HRESULT DAPI MemFree(
36 __in LPVOID pv
37 );
38 SIZE_T DAPI MemSize(
39 __in LPCVOID pv
40 );
41
42 #ifdef __cplusplus
43 }
44 #endif
45
OLDNEW

Powered by Google App Engine
This is Rietveld