blob: 4d4567dc3f554489b50beb734a6cc6dc91b1cd2a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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: LocalFree.c
**
** Purpose: Positive test the LocalFree API.
** call LocalFree by passing NULL as local memory
** object handle
**
**
**============================================================*/
#include <palsuite.h>
int __cdecl main(int argc, char *argv[])
{
HLOCAL FreeHeap;
int err;
/*Initialize the PAL environment*/
err = PAL_Initialize(argc, argv);
if(0 != err)
{
return FAIL;
}
/*call LocalFree by passing NULL as local memory object handle*/
FreeHeap = LocalFree(NULL);
if(FreeHeap)
{
Fail("Failed to call LocalFree API, "
"error code=%u\n", GetLastError());
}
PAL_Terminate();
return PASS;
}
|