1 /***************************************************************************
2  * Copyright (c) 2024 Microsoft Corporation
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the MIT License which is available at
6  * https://opensource.org/licenses/MIT.
7  *
8  * SPDX-License-Identifier: MIT
9  **************************************************************************/
10 
11 
12 /**************************************************************************/
13 /**************************************************************************/
14 /**                                                                       */
15 /** GUIX Component                                                        */
16 /**                                                                       */
17 /**   System Management (System)                                          */
18 /**                                                                       */
19 /**************************************************************************/
20 
21 #define GX_SOURCE_CODE
22 
23 
24 /* Include necessary system files.  */
25 
26 #include "gx_api.h"
27 #include "gx_system.h"
28 
29 /**************************************************************************/
30 /*                                                                        */
31 /*  FUNCTION                                               RELEASE        */
32 /*                                                                        */
33 /*    _gxe_system_version_string_get                      PORTABLE C      */
34 /*                                                           6.1          */
35 /*  AUTHOR                                                                */
36 /*                                                                        */
37 /*    Kenneth Maxwell, Microsoft Corporation                              */
38 /*                                                                        */
39 /*  DESCRIPTION                                                           */
40 /*                                                                        */
41 /*    This function checks for errors in system version string get call.  */
42 /*                                                                        */
43 /*  INPUT                                                                 */
44 /*                                                                        */
45 /*    return_string                         Pointer to return string      */
46 /*                                            pointer                     */
47 /*                                                                        */
48 /*  OUTPUT                                                                */
49 /*                                                                        */
50 /*    VOID                                                                */
51 /*                                                                        */
52 /*  CALLS                                                                 */
53 /*                                                                        */
54 /*    _gx_system_version_string_get         Actual system version string  */
55 /*                                            get call                    */
56 /*                                                                        */
57 /*  CALLED BY                                                             */
58 /*                                                                        */
59 /*    Application Code                                                    */
60 /*                                                                        */
61 /*  RELEASE HISTORY                                                       */
62 /*                                                                        */
63 /*    DATE              NAME                      DESCRIPTION             */
64 /*                                                                        */
65 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
66 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
67 /*                                            resulting in version 6.1    */
68 /*                                                                        */
69 /**************************************************************************/
70 #if defined(GX_ENABLE_DEPRECATED_STRING_API)
_gxe_system_version_string_get(GX_CHAR ** return_string)71 UINT  _gxe_system_version_string_get(GX_CHAR **return_string)
72 {
73 UINT status;
74 
75     /* Check for invalid pointer.  */
76     if (return_string == GX_NULL)
77     {
78         return(GX_PTR_ERROR);
79     }
80 
81     status = _gx_system_version_string_get(return_string);
82 
83     /* Return status.  */
84     return(status);
85 }
86 #endif
87 
88 /**************************************************************************/
89 /*                                                                        */
90 /*  FUNCTION                                               RELEASE        */
91 /*                                                                        */
92 /*    _gxe_system_version_string_get_ext                  PORTABLE C      */
93 /*                                                           6.1          */
94 /*  AUTHOR                                                                */
95 /*                                                                        */
96 /*    Kenneth Maxwell, Microsoft Corporation                              */
97 /*                                                                        */
98 /*  DESCRIPTION                                                           */
99 /*                                                                        */
100 /*    This function checks for errors in new system version string get    */
101 /*    call.                                                               */
102 /*                                                                        */
103 /*  INPUT                                                                 */
104 /*                                                                        */
105 /*    return_string                         Pointer to return string      */
106 /*                                            pointer                     */
107 /*                                                                        */
108 /*  OUTPUT                                                                */
109 /*                                                                        */
110 /*    VOID                                                                */
111 /*                                                                        */
112 /*  CALLS                                                                 */
113 /*                                                                        */
114 /*    _gx_system_version_string_get_ext     Actual system version string  */
115 /*                                            get call                    */
116 /*                                                                        */
117 /*  CALLED BY                                                             */
118 /*                                                                        */
119 /*    Application Code                                                    */
120 /*                                                                        */
121 /*  RELEASE HISTORY                                                       */
122 /*                                                                        */
123 /*    DATE              NAME                      DESCRIPTION             */
124 /*                                                                        */
125 /*  05-19-2020     Kenneth Maxwell          Initial Version 6.0           */
126 /*  09-30-2020     Kenneth Maxwell          Modified comment(s),          */
127 /*                                            resulting in version 6.1    */
128 /*                                                                        */
129 /**************************************************************************/
_gxe_system_version_string_get_ext(GX_STRING * return_string)130 UINT  _gxe_system_version_string_get_ext(GX_STRING *return_string)
131 {
132 UINT status;
133 
134     /* Check for invalid pointer.  */
135     if (return_string == GX_NULL)
136     {
137         return(GX_PTR_ERROR);
138     }
139 
140     status = _gx_system_version_string_get_ext(return_string);
141 
142     /* Return status.  */
143     return(status);
144 }
145 
146