ReactOS  0.4.15-dev-509-g96a357b
string.c
Go to the documentation of this file.
1 /*
2  * COPYRIGHT: See COPYING in the top level directory
3  * PROJECT: ReactOS NDIS library
4  * FILE: ndis/string.c
5  * PURPOSE: String management routines
6  * PROGRAMMERS: Casper S. Hornstrup (chorns@users.sourceforge.net)
7  * Vizzini (vizzini@plasmic.com)
8  * REVISIONS:
9  * CSH 01/08-2000 Created
10  * Vizzini 08-Oct-2003 Error checking, documentation, and formatting
11  */
12 
13 #include "ndissys.h"
14 
15 /*
16  * @implemented
17  */
18 #undef NdisAnsiStringToUnicodeString
20 EXPORT
24 /*
25  * FUNCTION: Converts an ANSI string to an NDIS (unicode) string
26  * ARGUMENTS:
27  * DestinationString = Address of buffer to place converted string in
28  * SourceString = Pointer to ANSI string to be converted
29  * NOTES:
30  * - caller must be running at IRQL = PASSIVE_LEVEL
31  */
32 {
33  PAGED_CODE();
36 
40 }
41 
42 
43 /*
44  * @implemented
45  */
46 #undef NdisEqualString
47 BOOLEAN
48 EXPORT
50  IN PNDIS_STRING String1,
53 /*
54  * FUNCTION: Tests two strings for equality
55  * ARGUMENTS:
56  * String1 = Pointer to first string
57  * String2 = Pointer to second string
58  * CaseInsensitive = TRUE if the compare should be case insensitive
59  * NOTES:
60  * - caller must be at IRQL = PASSIVE_LEVEL
61  */
62 {
63  PAGED_CODE();
64  ASSERT(String1);
65  ASSERT(String2);
66 
67  return RtlEqualUnicodeString((PUNICODE_STRING)String1,
70 }
71 
72 /*
73  * @implemented
74  */
75 #undef NdisInitAnsiString
76 VOID
77 EXPORT
81 /*
82  * FUNCTION: Initializes an ANSI string
83  * ARGUMENTS:
84  * DestinationString = Address of buffer to place string in
85  * SourceString = Pointer to null terminated ANSI string
86  * NOTES:
87  * - Caller must be at IRQL <= DISPATCH_LEVEL
88  */
89 {
92 
94 }
95 
96 /*
97  * @implemented
98  */
99 VOID
100 EXPORT
104 /*
105  * FUNCTION: Initializes an NDIS (unicode) string
106  * ARGUMENTS:
107  * DestinationString = Address of buffer to place string in
108  * SourceString = Pointer to null terminated ANSI string
109  * NOTES:
110  * - Must be called at IRQL = PASSIVE_LEVEL
111  */
112 {
114 
115  PAGED_CODE();
118 
120 
122 }
123 
124 /*
125  * @implemented
126  */
127 #undef NdisInitUnicodeString
128 VOID
129 EXPORT
133 /*
134  * FUNCTION: Initializes an unicode string
135  * ARGUMENTS:
136  * DestinationString = Address of buffer to place string in
137  * SourceString = Pointer to null terminated unicode string
138  * NOTES:
139  * - call with IRQL <= DISPATCH_LEVEL
140  */
141 {
144 
146 }
147 
148 /*
149  * @implemented
150  */
151 #undef NdisUnicodeStringToAnsiString
153 EXPORT
157 /*
158  * FUNCTION: Converts an NDIS (unicode) string to an ANSI string
159  * ARGUMENTS:
160  * DestinationString = Address of buffer to place converted string in
161  * SourceString = Pointer to unicode string to be converted
162  * NOTES:
163  * - must be called at IRQL = PASSIVE_LEVEL
164  */
165 {
166  PAGED_CODE();
169 
173  FALSE);
174 }
175 
176 /*
177  * @implemented
178  */
179 #undef NdisUpcaseUnicodeString
180 NTSTATUS
181 EXPORT
185 /*
186  * FUNCTION: Uppercase a UNICODE string
187  * ARGUMENTS:
188  * DestinationString: caller-allocated space for the uppercased string
189  * SourceString: string to be uppercased
190  * NOTES:
191  * - Currently requires caller to allocate destination string - XXX is this right?
192  * - callers must be running at IRQL = PASSIVE_LEVEL
193  */
194 {
195  PAGED_CODE();
198 
200 }
201 
202 /* EOF */
CONST char * PCSZ
Definition: umtypes.h:125
const uint16_t * PCWSTR
Definition: typedefs.h:56
#define IN
Definition: typedefs.h:39
#define TRUE
Definition: types.h:120
NTSTATUS RtlUpcaseUnicodeString(PUNICODE_STRING dst, PUNICODE_STRING src, BOOLEAN Alloc)
Definition: string_lib.cpp:46
unsigned char * PUCHAR
Definition: retypes.h:3
LONG NTSTATUS
Definition: precomp.h:26
VOID EXPORT NdisInitAnsiString(IN OUT PANSI_STRING DestinationString, IN PCSTR SourceString)
Definition: string.c:78
int NDIS_STATUS
Definition: ntddndis.h:471
NTSYSAPI VOID NTAPI RtlInitAnsiString(PANSI_STRING DestinationString, PCSZ SourceString)
NDIS_STATUS EXPORT NdisUnicodeStringToAnsiString(IN OUT PANSI_STRING DestinationString, IN PNDIS_STRING SourceString)
Definition: string.c:154
unsigned char BOOLEAN
_Out_ _Inout_ POEM_STRING DestinationString
Definition: rtlfuncs.h:1868
_In_ const STRING _In_ BOOLEAN CaseInsensitive
Definition: rtlfuncs.h:2291
NTSYSAPI NTSTATUS NTAPI RtlUnicodeStringToAnsiString(PANSI_STRING DestinationString, PUNICODE_STRING SourceString, BOOLEAN AllocateDestinationString)
NTSTATUS EXPORT NdisUpcaseUnicodeString(OUT PUNICODE_STRING DestinationString, IN PUNICODE_STRING SourceString)
Definition: string.c:182
VOID EXPORT NdisInitializeString(IN OUT PNDIS_STRING DestinationString, IN PUCHAR SourceString)
Definition: string.c:101
ASSERT((InvokeOnSuccess||InvokeOnError||InvokeOnCancel) ?(CompletionRoutine !=NULL) :TRUE)
_Out_ _Inout_ POEM_STRING _In_ PCUNICODE_STRING SourceString
Definition: rtlfuncs.h:1868
VOID EXPORT NdisInitUnicodeString(IN OUT PNDIS_STRING DestinationString, IN PCWSTR SourceString)
Definition: string.c:130
NTSYSAPI VOID NTAPI RtlInitString(PSTRING DestinationString, PCSZ SourceString)
NTSYSAPI NTSTATUS NTAPI RtlAnsiStringToUnicodeString(PUNICODE_STRING DestinationString, PANSI_STRING SourceString, BOOLEAN AllocateDestinationString)
_In_ const STRING * String2
Definition: rtlfuncs.h:2291
#define OUT
Definition: typedefs.h:40
NTSYSAPI VOID NTAPI RtlInitUnicodeString(PUNICODE_STRING DestinationString, PCWSTR SourceString)
const char * PCSTR
Definition: typedefs.h:52
NDIS_STATUS EXPORT NdisAnsiStringToUnicodeString(IN OUT PNDIS_STRING DestinationString, IN PANSI_STRING SourceString)
Definition: string.c:21
NTSYSAPI BOOLEAN NTAPI RtlEqualUnicodeString(PUNICODE_STRING String1, PUNICODE_STRING String2, BOOLEAN CaseInSensitive)
BOOLEAN EXPORT NdisEqualString(IN PNDIS_STRING String1, IN PNDIS_STRING String2, IN BOOLEAN CaseInsensitive)
Definition: string.c:49
#define PAGED_CODE()