Go to the source code of this file.
◆ CharToByte()
Definition at line 208 of file misc.c.
210{
212 {
214 }
216 {
218 return (
INT)Char - ((
INT)
'A' - 10);
219 else
220 return (
INT)Char - ((
INT)
'a' - 10);
221 }
222 return 0;
223}
Referenced by StringToGUID().
◆ CreateGUID()
Definition at line 152 of file misc.c.
154{
156
157 pGuid->Data3 &= 0x0fff;
158 pGuid->Data3 |= (4 << 12);
159
160
161
162 pGuid->Data4[0] &= 0x3f;
163 pGuid->Data4[0] |= 0x80;
164}
Referenced by ConvertGPT(), and CreatePrimaryGptPartition().
◆ CreateSignature()
◆ DuplicateQuotedString()
Definition at line 84 of file misc.c.
86{
90
93
94 if (pszInString[0] ==
L'"')
95 {
98
99 pStart = &pszInString[1];
100 pEnd =
wcschr(pStart,
'"');
102 {
104 }
105 else
106 {
108 }
109 }
110 else
111 {
112 pStart = pszInString;
114 }
115
119 if (pszOutString ==
NULL)
121
123
124 return pszOutString;
125}
PVOID NTAPI RtlAllocateHeap(IN PVOID HeapHandle, IN ULONG Flags, IN SIZE_T Size)
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
WINBASEAPI _In_ DWORD nLength
◆ DuplicateString()
Definition at line 129 of file misc.c.
131{
134
137
142 if (pszOutString ==
NULL)
144
145 wcscpy(pszOutString, pszInString);
146
147 return pszOutString;
148}
◆ HasPrefix()
◆ IsDecString()
◆ IsHexString()
◆ PrintGUID()
Definition at line 187 of file misc.c.
190{
192 L"%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x",
193 pGuid->Data1,
194 pGuid->Data2,
195 pGuid->Data3,
196 pGuid->Data4[0],
197 pGuid->Data4[1],
198 pGuid->Data4[2],
199 pGuid->Data4[3],
200 pGuid->Data4[4],
201 pGuid->Data4[5],
202 pGuid->Data4[6],
203 pGuid->Data4[7]);
204}
Referenced by DetailDisk(), DetailPartition(), and UniqueIdDisk().
◆ RoundingDivide()
Definition at line 75 of file misc.c.
78{
80}
_In_ LARGE_INTEGER Divisor
◆ StringToGUID()
Definition at line 227 of file misc.c.
230{
232
233 if (pszString ==
NULL)
235
236 pGuid->Data1 = 0;
237 for (
i = 0;
i < 8;
i++)
238 {
241
242 pGuid->Data1 = (pGuid->Data1 << 4) |
CharToByte(pszString[
i]);
243 }
244
245 if (pszString[8] !=
L'-')
247
248 pGuid->Data2 = 0;
249 for (
i = 9;
i < 13;
i++)
250 {
253
254 pGuid->Data2 = (pGuid->Data2 << 4) |
CharToByte(pszString[
i]);
255 }
256
257 if (pszString[13] !=
L'-')
259
260 pGuid->Data3 = 0;
261 for (
i = 14;
i < 18;
i++)
262 {
265
266 pGuid->Data3 = (pGuid->Data3 << 4) |
CharToByte(pszString[
i]);
267 }
268
269 if (pszString[18] !=
L'-')
271
272 for (
i = 19;
i < 36;
i += 2)
273 {
275 {
276 if (pszString[
i] !=
L'-')
279 }
280
283
285 }
286
287 if (pszString[36] ==
L'\0')
289
291}
static BYTE CharToByte(WCHAR Char)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Referenced by CreatePrimaryGptPartition(), setid_main(), and UniqueIdDisk().