blob: 4876fe180f1ad5f6d97b42042206515eb805ac41 (
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
// 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: GetCalendarInfoW.c
**
** Purpose: Positive test the GetCalendarInfoW API.
** Call GetCalendarInfoW to retrieve the information of a
** calendar
**
**
**============================================================*/
#define UNICODE
#include <palsuite.h>
int __cdecl main(int argc, char *argv[])
{
int err;
LCID Locale = LOCALE_USER_DEFAULT;
CALTYPE CalType = CAL_ITWODIGITYEARMAX|CAL_RETURN_NUMBER;
DWORD dwValue;
/*Initialize the PAL environment*/
err = PAL_Initialize(argc, argv);
if(0 != err)
{
return FAIL;
}
err = GetCalendarInfoW(Locale,/*locale idendifier*/
CAL_GREGORIAN, /*calendar identifier*/
CalType, /*calendar tyope*/
NULL, /*buffer to store the retrieve info*/
0, /*alwayse zero*/
&dwValue);/*to store the requrest data*/
if (0 == err)
{
Fail("GetCalendarInfoW failed for CAL_GREGORIAN!\n");
}
err = GetCalendarInfoW(Locale,/*locale idendifier*/
CAL_GREGORIAN_US, /*calendar identifier*/
CalType, /*calendar tyope*/
NULL, /*buffer to store the retreive info*/
0, /*alwayse zero*/
&dwValue);/*to store the requrest data*/
if (0 == err)
{
Fail("GetCalendarInfoW failed for CAL_GREGORIAN_US!\n");
}
PAL_Terminate();
return PASS;
}
|