summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp')
-rw-r--r--src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp39
1 files changed, 39 insertions, 0 deletions
diff --git a/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp b/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp
new file mode 100644
index 0000000000..bec6b5c616
--- /dev/null
+++ b/src/pal/tests/palsuite/filemapping_memmgt/GetProcessHeap/test1/GetProcessHeap.cpp
@@ -0,0 +1,39 @@
+// Licensed to the .NET Foundation under one or more agreements.
+// The .NET Foundation licenses this file to you under the MIT license.
+// See the LICENSE file in the project root for more information.
+
+/*=============================================================
+**
+** Source: getprocheap.c
+**
+** Purpose: Positive test the GetProcessHeap API.
+** Call GetProcessHeap to retrieve the handle of
+** calling process heap
+**
+**
+**============================================================*/
+#include <palsuite.h>
+
+int __cdecl main(int argc, char *argv[])
+{
+ int err;
+ HANDLE ProcessHeapHandle;
+
+ //Initialize the PAL environment
+ err = PAL_Initialize(argc, argv);
+ if(0 != err)
+ {
+ ExitProcess(FAIL);
+ }
+
+ //Retrieve the calling process heap handle
+ ProcessHeapHandle = GetProcessHeap();
+
+ if(!ProcessHeapHandle)
+ {
+ Fail("\nFailed to call GetProcessHeap API!\n");
+ }
+
+ PAL_Terminate();
+ return PASS;
+}