ReactOS 0.4.16-dev-905-gc1b8c4f
iso.c
Go to the documentation of this file.
1/*
2 * FreeLoader
3 * Copyright (C) 1998-2003 Brian Palmer <brianp@sginet.com>
4 * Copyright (C) 2009 Hervé Poussineau <hpoussin@reactos.org>
5 *
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
19 */
20
21#ifndef _M_ARM
22#include <freeldr.h>
23
24#include <debug.h>
26
27#define SECTORSIZE 2048
28#define TAG_ISO_VOLUME 'VosI'
29#define TAG_ISO_BUFFER 'BosI'
30#define TAG_ISO_FILE 'FosI'
31
32typedef struct _ISO_VOLUME_INFO
33{
41
43
44static
48{
49 PCSTR Last = NULL;
50
51 ASSERT(Path != NULL);
52
53 while (*Path != ANSI_NULL)
54 {
55 if (*Path == '\\' || *Path == '/')
56 Last = Path;
57
58 ++Path;
59 }
60
61 return Last;
62}
63
64static BOOLEAN IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectoryLength, PCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
65{
68 ULONG i;
69 CHAR Name[32];
70
71 TRACE("IsoSearchDirectoryBufferForFile() DirectoryBuffer = 0x%x DirectoryLength = %d FileName = %s\n", DirectoryBuffer, DirectoryLength, FileName);
72
73 Offset = 0;
74 Record = (PDIR_RECORD)DirectoryBuffer;
75 while (TRUE)
76 {
77 Offset = Offset + Record->RecordLength;
78 Record = (PDIR_RECORD)((ULONG_PTR)DirectoryBuffer + Offset);
79
80 if (Record->RecordLength == 0)
81 {
83 Record = (PDIR_RECORD)((ULONG_PTR)DirectoryBuffer + Offset);
84 }
85
86 if (Offset >= DirectoryLength)
87 return FALSE;
88
89 if (Record->FileIdLength == 1 && Record->FileId[0] == 0)
90 {
91 TRACE("Name '.'\n");
92 }
93 else if (Record->FileIdLength == 1 && Record->FileId[0] == 1)
94 {
95 TRACE("Name '..'\n");
96 }
97 else
98 {
99 for (i = 0; i < Record->FileIdLength && Record->FileId[i] != ';'; i++)
100 Name[i] = Record->FileId[i];
101 Name[i] = ANSI_NULL;
102 TRACE("Name '%s'\n", Name);
103
104 if (strlen(FileName) == strlen(Name) && _stricmp(FileName, Name) == 0)
105 {
106 IsoFileInfoPointer->FileStart = Record->ExtentLocationL;
107 IsoFileInfoPointer->FileSize = Record->DataLengthL;
108 IsoFileInfoPointer->FilePointer = 0;
109 IsoFileInfoPointer->Directory = !!(Record->FileFlags & 0x02);
110
111 return TRUE;
112 }
113
114 }
115 }
116
117 return FALSE;
118}
119
120
121/*
122 * IsoBufferDirectory()
123 * This function allocates a buffer, reads the specified directory
124 * and returns a pointer to that buffer into pDirectoryBuffer. The
125 * function returns an ARC error code. The directory is specified
126 * by its starting sector and length.
127 */
128static ARC_STATUS IsoBufferDirectory(ULONG DeviceId, ULONG DirectoryStartSector, ULONG DirectoryLength,
129 PVOID* pDirectoryBuffer)
130{
131 PVOID DirectoryBuffer;
134 ULONG Count;
136
137 TRACE("IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength);
138
139 SectorCount = ROUND_UP(DirectoryLength, SECTORSIZE) / SECTORSIZE;
140 TRACE("Trying to read (DirectoryCount) %d sectors.\n", SectorCount);
141
142 //
143 // Attempt to allocate memory for directory buffer
144 //
145 TRACE("Trying to allocate (DirectoryLength) %d bytes.\n", DirectoryLength);
146 DirectoryBuffer = FrLdrTempAlloc(DirectoryLength, TAG_ISO_BUFFER);
147 if (!DirectoryBuffer)
148 return ENOMEM;
149
150 //
151 // Now read directory contents into DirectoryBuffer
152 //
153 Position.HighPart = 0;
154 Position.LowPart = DirectoryStartSector * SECTORSIZE;
155 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
156 if (Status != ESUCCESS)
157 {
158 FrLdrTempFree(DirectoryBuffer, TAG_ISO_BUFFER);
159 return Status;
160 }
161 Status = ArcRead(DeviceId, DirectoryBuffer, SectorCount * SECTORSIZE, &Count);
163 {
164 FrLdrTempFree(DirectoryBuffer, TAG_ISO_BUFFER);
165 return EIO;
166 }
167
168 *pDirectoryBuffer = DirectoryBuffer;
169 return ESUCCESS;
170}
171
172/*
173 * IsoLookupFile()
174 * This function searches the file system for the
175 * specified filename and fills in an ISO_FILE_INFO structure
176 * with info describing the file, etc. returns ARC error code
177 */
179{
180 PCSTR FullPath = FileName;
182 PCSTR FileNameStr;
183 ULONG i, DirectoryPathLength, DirectorySector, DirectoryLength;
184 PVOID DirectoryBuffer;
185 ULONG NumberOfPathParts;
186 CHAR PathBuffer[261];
187 CHAR* PathPart;
189 BOOLEAN DoFullLookup;
190
191 TRACE("IsoLookupFile() FileName = %s\n", FileName);
192
193 Volume = IsoVolumes[DeviceId];
194
195 /*
196 * Extract the file name
197 * '\test.ini' --> 'test.ini'
198 * '\folder\app.exe' --> 'app.exe'
199 */
200 FileNameStr = IsoLastPathSeparator(FileName) + 1;
201
202 /*
203 * Extract the directory path, including trailing slash
204 * '\test.ini' --> '\'
205 * '\folder\app.exe' --> '\folder\'
206 */
207 DirectoryPathLength = FileNameStr - FileName;
208
209 /* See if this directory has been buffered before */
210 DoFullLookup = (DirectoryPathLength != Volume->DirectoryPathLength) ||
211 !RtlEqualMemory(FileName, Volume->DirectoryPath, DirectoryPathLength);
212 if (!DoFullLookup)
213 {
214 PathPart = (CHAR*)FileNameStr;
215 DirectoryBuffer = Volume->DirectoryBuffer;
216 DirectoryLength = Volume->DirectoryLength;
217
218 NumberOfPathParts = 1;
219 }
220 else
221 {
222 PathPart = PathBuffer;
223 DirectorySector = Volume->PvdDirectorySector;
224 DirectoryLength = Volume->PvdDirectoryLength;
225
226 /* Skip leading path separator, if any */
227 if (*FileName == '\\' || *FileName == '/')
228 ++FileName;
229
230 /* Figure out how many sub-directories we are nested in */
231 NumberOfPathParts = FsGetNumPathParts(FileName);
232 }
233
234 //
235 // Loop once for each part
236 //
237 for (i=0; i<NumberOfPathParts; i++)
238 {
239 if (DoFullLookup)
240 {
241 /* Get first path part */
243
244 /* Advance to the next part of the path */
245 while ((*FileName != ANSI_NULL) && (*FileName != '\\') && (*FileName != '/'))
246 {
247 FileName++;
248 }
249 FileName++;
250
251 /* Buffer the directory contents */
252 Status = IsoBufferDirectory(DeviceId,
253 DirectorySector,
254 DirectoryLength,
255 &DirectoryBuffer);
256 if (Status != ESUCCESS)
257 return Status;
258
259 /* Save the directory buffer */
260 if ((i + 1) >= NumberOfPathParts)
261 {
262 if (Volume->DirectoryBuffer)
263 FrLdrTempFree(Volume->DirectoryBuffer, TAG_ISO_BUFFER);
264
265 Volume->DirectoryPathLength = DirectoryPathLength;
266 Volume->DirectoryBuffer = DirectoryBuffer;
267 Volume->DirectoryLength = DirectoryLength;
268
269 RtlCopyMemory(Volume->DirectoryPath, FullPath, DirectoryPathLength);
270 }
271 }
272
273 /* Search for file name in directory */
274 if (!IsoSearchDirectoryBufferForFile(DirectoryBuffer,
275 DirectoryLength,
276 PathPart,
277 IsoFileInfo))
278 {
279 /* Free the directory buffer that wasn't cached */
280 if ((i + 1) < NumberOfPathParts)
281 {
282 ASSERT(DirectoryBuffer != Volume->DirectoryBuffer);
283 FrLdrTempFree(DirectoryBuffer, TAG_ISO_BUFFER);
284 }
285 return ENOENT;
286 }
287
288 //
289 // If we have another sub-directory to go then
290 // grab the start sector and file size
291 //
292 if ((i+1) < NumberOfPathParts)
293 {
294 FrLdrTempFree(DirectoryBuffer, TAG_ISO_BUFFER);
295
296 DirectorySector = IsoFileInfo->FileStart;
297 DirectoryLength = IsoFileInfo->FileSize;
298 }
299 }
300
301 return ESUCCESS;
302}
303
304static
306{
309 return ESUCCESS;
310}
311
312static
314{
316
318 Information->EndingAddress.LowPart = FileHandle->FileSize;
319 Information->CurrentAddress.LowPart = FileHandle->FilePointer;
320
321 TRACE("IsoGetFileInformation(%lu) -> FileSize = %lu, FilePointer = 0x%lx\n",
322 FileId, Information->EndingAddress.LowPart, Information->CurrentAddress.LowPart);
323
324 return ESUCCESS;
325}
326
327static
329{
331 ULONG DeviceId;
333
334 if (OpenMode != OpenReadOnly)
335 return EACCES;
336
337 DeviceId = FsGetDeviceId(*FileId);
338
339 TRACE("IsoOpen() FileName = %s\n", Path);
340
342 if (!FileHandle)
343 return ENOMEM;
344
345 Status = IsoLookupFile(Path, DeviceId, FileHandle);
346 if (Status != ESUCCESS)
347 {
349 return ENOENT;
350 }
351
353 return ESUCCESS;
354}
355
356static
358{
361 UCHAR SectorBuffer[SECTORSIZE];
363 ULONG DeviceId;
364 ULONG SectorNumber;
365 ULONG OffsetInSector;
366 ULONG LengthInSector;
367 ULONG NumberOfSectors;
369
370 TRACE("IsoRead() Buffer = %p, N = %lu\n", Buffer, N);
371
372 DeviceId = FsGetDeviceId(FileId);
373 *Count = 0;
374
375 //
376 // If the user is trying to read past the end of
377 // the file then return success with Count == 0.
378 //
379 if (FileHandle->FilePointer >= FileHandle->FileSize)
380 {
381 return ESUCCESS;
382 }
383
384 //
385 // If the user is trying to read more than there is to read
386 // then adjust the amount to read.
387 //
388 if (FileHandle->FilePointer + N > FileHandle->FileSize)
389 {
390 N = FileHandle->FileSize - FileHandle->FilePointer;
391 }
392
393 //
394 // Ok, now we have to perform at most 3 calculations
395 // I'll draw you a picture (using nifty ASCII art):
396 //
397 // CurrentFilePointer -+
398 // |
399 // +----------------+
400 // |
401 // +-----------+-----------+-----------+-----------+
402 // | Sector 1 | Sector 2 | Sector 3 | Sector 4 |
403 // +-----------+-----------+-----------+-----------+
404 // | |
405 // +---------------+--------------------+
406 // |
407 // N -----------------+
408 //
409 // 1 - The first calculation (and read) will align
410 // the file pointer with the next sector
411 // boundary (if we are supposed to read that much)
412 // 2 - The next calculation (and read) will read
413 // in all the full sectors that the requested
414 // amount of data would cover (in this case
415 // sectors 2 & 3).
416 // 3 - The last calculation (and read) would read
417 // in the remainder of the data requested out of
418 // the last sector.
419 //
420
421
422 //
423 // Only do the first read if we
424 // aren't aligned on a cluster boundary
425 //
426 if (FileHandle->FilePointer % SECTORSIZE)
427 {
428 //
429 // Do the math for our first read
430 //
431 SectorNumber = FileHandle->FileStart + (FileHandle->FilePointer / SECTORSIZE);
432 OffsetInSector = FileHandle->FilePointer % SECTORSIZE;
433 LengthInSector = min(N, SECTORSIZE - OffsetInSector);
434
435 //
436 // Now do the read and update Count, N, FilePointer, & Buffer
437 //
438 Position.HighPart = 0;
439 Position.LowPart = SectorNumber * SECTORSIZE;
440 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
441 if (Status != ESUCCESS)
442 {
443 return Status;
444 }
445 Status = ArcRead(DeviceId, SectorBuffer, SECTORSIZE, &BytesRead);
446 if (Status != ESUCCESS || BytesRead != SECTORSIZE)
447 {
448 return EIO;
449 }
450 RtlCopyMemory(Buffer, SectorBuffer + OffsetInSector, LengthInSector);
451 *Count += LengthInSector;
452 N -= LengthInSector;
453 FileHandle->FilePointer += LengthInSector;
454 Buffer = (PVOID)((ULONG_PTR)Buffer + LengthInSector);
455 }
456
457 //
458 // Do the math for our second read (if any data left)
459 //
460 if (N > 0)
461 {
462 //
463 // Determine how many full clusters we need to read
464 //
465 NumberOfSectors = (N / SECTORSIZE);
466
467 SectorNumber = FileHandle->FileStart + (FileHandle->FilePointer / SECTORSIZE);
468
469 //
470 // Now do the read and update Count, N, FilePointer, & Buffer
471 //
472 Position.HighPart = 0;
473 Position.LowPart = SectorNumber * SECTORSIZE;
474 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
475 if (Status != ESUCCESS)
476 {
477 return Status;
478 }
479 Status = ArcRead(DeviceId, Buffer, NumberOfSectors * SECTORSIZE, &BytesRead);
480 if (Status != ESUCCESS || BytesRead != NumberOfSectors * SECTORSIZE)
481 {
482 return EIO;
483 }
484
485 *Count += NumberOfSectors * SECTORSIZE;
486 N -= NumberOfSectors * SECTORSIZE;
487 FileHandle->FilePointer += NumberOfSectors * SECTORSIZE;
488 Buffer = (PVOID)((ULONG_PTR)Buffer + NumberOfSectors * SECTORSIZE);
489 }
490
491 //
492 // Do the math for our third read (if any data left)
493 //
494 if (N > 0)
495 {
496 SectorNumber = FileHandle->FileStart + (FileHandle->FilePointer / SECTORSIZE);
497
498 //
499 // Now do the read and update Count, N, FilePointer, & Buffer
500 //
501 Position.HighPart = 0;
502 Position.LowPart = SectorNumber * SECTORSIZE;
503 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
504 if (Status != ESUCCESS)
505 {
506 return Status;
507 }
508 Status = ArcRead(DeviceId, SectorBuffer, SECTORSIZE, &BytesRead);
509 if (Status != ESUCCESS || BytesRead != SECTORSIZE)
510 {
511 return EIO;
512 }
513 RtlCopyMemory(Buffer, SectorBuffer, N);
514 *Count += N;
515 FileHandle->FilePointer += N;
516 }
517
518 TRACE("IsoRead() done\n");
519
520 return ESUCCESS;
521}
522
523static
525{
527 LARGE_INTEGER NewPosition = *Position;
528
529 switch (SeekMode)
530 {
531 case SeekAbsolute:
532 break;
533 case SeekRelative:
534 NewPosition.QuadPart += (ULONGLONG)FileHandle->FilePointer;
535 break;
536 default:
537 ASSERT(FALSE);
538 return EINVAL;
539 }
540
541 if (NewPosition.HighPart != 0)
542 return EINVAL;
543 if (NewPosition.LowPart >= FileHandle->FileSize)
544 return EINVAL;
545
546 FileHandle->FilePointer = NewPosition.LowPart;
547 return ESUCCESS;
548}
549
551{
552 IsoClose,
554 IsoOpen,
555 IsoRead,
556 IsoSeek,
557 L"cdfs",
558};
559
560const DEVVTBL* IsoMount(ULONG DeviceId)
561{
563 PPVD Pvd = (PPVD)Buffer;
565 ULONG Count;
568
569 TRACE("Enter IsoMount(%lu)\n", DeviceId);
570
571 /*
572 * Read the Primary Volume Descriptor
573 */
574 Position.HighPart = 0;
575 Position.LowPart = 16 * SECTORSIZE;
576 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
577 if (Status != ESUCCESS)
578 return NULL;
579 Status = ArcRead(DeviceId, Pvd, SECTORSIZE, &Count);
580 if (Status != ESUCCESS || Count < sizeof(PVD))
581 return NULL;
582
583 /* Check if the PVD is valid */
584 if (!(Pvd->VdType == 1 && RtlEqualMemory(Pvd->StandardId, "CD001", 5) && Pvd->VdVersion == 1))
585 {
586 WARN("Unrecognized CDROM format\n");
587 return NULL;
588 }
589 if (Pvd->LogicalBlockSizeL != SECTORSIZE)
590 {
591 ERR("Unsupported LogicalBlockSize %u\n", Pvd->LogicalBlockSizeL);
592 return NULL;
593 }
594
595 Count = (ULONG)((ULONGLONG)Pvd->VolumeSpaceSizeL * SECTORSIZE / 1024 / 1024);
596 TRACE("Recognized ISO9660 drive, size %lu MB (%lu sectors)\n",
597 Count, Pvd->VolumeSpaceSizeL);
598
600 if (!Volume)
601 return NULL;
602 RtlZeroMemory(Volume, sizeof(*Volume));
603
604 /* Cache the PVD information */
605 Volume->PvdDirectorySector = Pvd->RootDirRecord.ExtentLocationL;
606 Volume->PvdDirectoryLength = Pvd->RootDirRecord.DataLengthL;
607
608 IsoVolumes[DeviceId] = Volume;
609
610 /* Everything OK, return the ISO9660 function table */
611 return &Iso9660FuncTable;
612}
613
614#endif
#define N
Definition: crc32.c:57
unsigned char BOOLEAN
PRTL_UNICODE_STRING_BUFFER Path
#define ENOENT
Definition: acclib.h:79
#define EINVAL
Definition: acclib.h:90
#define ENOMEM
Definition: acclib.h:84
#define EIO
Definition: acclib.h:81
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
#define EACCES
Definition: acclib.h:85
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define DBG_DEFAULT_CHANNEL(ch)
Definition: debug.h:106
ARC_STATUS ArcSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
Definition: fs.c:455
PVOID FsGetDeviceSpecific(ULONG FileId)
Definition: fs.c:632
ULONG FsGetNumPathParts(PCSTR Path)
Definition: fs.c:540
VOID FsSetDeviceSpecific(ULONG FileId, PVOID Specific)
Definition: fs.c:625
ULONG FsGetDeviceId(ULONG FileId)
Definition: fs.c:639
#define MAX_FDS
Definition: fs.h:34
ARC_STATUS ArcRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
Definition: fs.c:448
VOID FsGetFirstNameFromPath(PCHAR Buffer, PCSTR Path)
Definition: fs.c:568
VOID FrLdrTempFree(PVOID Allocation, ULONG Tag)
Definition: heap.c:553
PVOID FrLdrTempAlloc(_In_ SIZE_T Size, _In_ ULONG Tag)
Definition: heap.c:545
const DEVVTBL * IsoMount(ULONG DeviceId)
Definition: iso.c:560
static PCSTR IsoLastPathSeparator(_In_ PCSTR Path)
Definition: iso.c:46
static ARC_STATUS IsoSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
Definition: iso.c:524
static PISO_VOLUME_INFO IsoVolumes[MAX_FDS]
Definition: iso.c:42
#define TAG_ISO_BUFFER
Definition: iso.c:29
static ARC_STATUS IsoLookupFile(PCSTR FileName, ULONG DeviceId, PISO_FILE_INFO IsoFileInfo)
Definition: iso.c:178
static ARC_STATUS IsoGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
Definition: iso.c:313
#define SECTORSIZE
Definition: iso.c:27
static ARC_STATUS IsoBufferDirectory(ULONG DeviceId, ULONG DirectoryStartSector, ULONG DirectoryLength, PVOID *pDirectoryBuffer)
Definition: iso.c:128
#define TAG_ISO_VOLUME
Definition: iso.c:28
static BOOLEAN IsoSearchDirectoryBufferForFile(PVOID DirectoryBuffer, ULONG DirectoryLength, PCHAR FileName, PISO_FILE_INFO IsoFileInfoPointer)
Definition: iso.c:64
struct _ISO_VOLUME_INFO ISO_VOLUME_INFO
#define TAG_ISO_FILE
Definition: iso.c:30
static const DEVVTBL Iso9660FuncTable
Definition: iso.c:550
struct _ISO_VOLUME_INFO * PISO_VOLUME_INFO
static ARC_STATUS IsoRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
Definition: iso.c:357
static ARC_STATUS IsoOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
Definition: iso.c:328
static ARC_STATUS IsoClose(ULONG FileId)
Definition: iso.c:305
#define _stricmp
Definition: cat.c:22
Definition: bufpool.h:45
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define ROUND_UP(n, align)
Definition: eventvwr.h:34
struct _FileName FileName
Definition: fatprocs.h:897
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE FileHandle
Definition: fltkernel.h:1231
Status
Definition: gdiplustypes.h:25
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
Definition: glfuncs.h:248
struct _DIR_RECORD * PDIR_RECORD
struct _PVD * PPVD
#define RtlEqualMemory(dst, src, len)
Definition: kdvm.h:18
UNICODE_STRING Volume
Definition: fltkernel.h:1172
#define ASSERT(a)
Definition: mode.c:44
#define min(a, b)
Definition: monoChain.cc:55
#define _In_
Definition: no_sal2.h:158
int Count
Definition: noreturn.cpp:7
#define ANSI_NULL
_In_ ULONG _In_ ULONG Offset
Definition: ntddpcm.h:101
#define L(x)
Definition: ntvdm.h:50
ULONG SectorCount
Definition: part_xbox.c:31
@ ESUCCESS
Definition: arc.h:32
ULONG ARC_STATUS
Definition: arc.h:4
@ SeekRelative
Definition: arc.h:60
@ SeekAbsolute
Definition: arc.h:59
enum _OPENMODE OPENMODE
enum _SEEKMODE SEEKMODE
@ OpenReadOnly
Definition: arc.h:65
#define TRACE(s)
Definition: solgame.cpp:4
ULONG ExtentLocationL
Definition: iso.h:27
ULONG DataLengthL
Definition: iso.h:29
ULONG FilePointer
Definition: iso.h:97
ULONG FileStart
Definition: iso.h:95
ULONG FileSize
Definition: iso.h:96
BOOLEAN Directory
Definition: iso.h:98
PVOID DirectoryBuffer
Definition: iso.c:38
UCHAR DirectoryPath[261]
Definition: iso.c:39
ULONG PvdDirectoryLength
Definition: iso.c:35
ULONG DirectoryPathLength
Definition: iso.c:36
ULONG DirectoryLength
Definition: iso.c:37
ULONG PvdDirectorySector
Definition: iso.c:34
Definition: iso.h:61
DIR_RECORD RootDirRecord
Definition: iso.h:84
USHORT LogicalBlockSizeL
Definition: iso.h:76
ULONG VolumeSpaceSizeL
Definition: iso.h:69
UCHAR StandardId[5]
Definition: iso.h:63
UCHAR VdType
Definition: iso.h:62
UCHAR VdVersion
Definition: iso.h:64
Definition: fs.h:25
static COORD Position
Definition: mouse.c:34
void * PVOID
Definition: typedefs.h:50
const char * PCSTR
Definition: typedefs.h:52
#define RtlCopyMemory(Destination, Source, Length)
Definition: typedefs.h:263
#define RtlZeroMemory(Destination, Length)
Definition: typedefs.h:262
uint32_t ULONG_PTR
Definition: typedefs.h:65
uint32_t ULONG
Definition: typedefs.h:59
uint64_t ULONGLONG
Definition: typedefs.h:67
char * PCHAR
Definition: typedefs.h:51
LONGLONG QuadPart
Definition: typedefs.h:114
ULONG LowPart
Definition: typedefs.h:106
_Must_inspect_result_ _In_ WDFIOTARGET _In_opt_ WDFREQUEST _In_opt_ PWDF_MEMORY_DESCRIPTOR _In_opt_ PLONGLONG _In_opt_ PWDF_REQUEST_SEND_OPTIONS _Out_opt_ PULONG_PTR BytesRead
Definition: wdfiotarget.h:870
_In_ WDFREQUEST _In_ NTSTATUS _In_ ULONG_PTR Information
Definition: wdfrequest.h:1049
_In_ struct _KBUGCHECK_REASON_CALLBACK_RECORD * Record
Definition: ketypes.h:268
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175