ReactOS 0.4.16-dev-1875-g3000d45
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 (_stricmp(FileName, Name) == 0)
105 {
106 IsoFileInfoPointer->FileStart = Record->ExtentLocationL;
107 IsoFileInfoPointer->FileSize = Record->DataLengthL;
108 IsoFileInfoPointer->FilePointer = 0;
109 IsoFileInfoPointer->Attributes = Record->FileFlags;
110 return TRUE;
111 }
112 }
113 }
114
115 return FALSE;
116}
117
118
119/*
120 * IsoBufferDirectory()
121 * This function allocates a buffer, reads the specified directory
122 * and returns a pointer to that buffer into pDirectoryBuffer. The
123 * function returns an ARC error code. The directory is specified
124 * by its starting sector and length.
125 */
126static ARC_STATUS IsoBufferDirectory(ULONG DeviceId, ULONG DirectoryStartSector, ULONG DirectoryLength,
127 PVOID* pDirectoryBuffer)
128{
129 PVOID DirectoryBuffer;
132 ULONG Count;
134
135 TRACE("IsoBufferDirectory() DirectoryStartSector = %d DirectoryLength = %d\n", DirectoryStartSector, DirectoryLength);
136
137 SectorCount = ROUND_UP(DirectoryLength, SECTORSIZE) / SECTORSIZE;
138 TRACE("Trying to read (DirectoryCount) %d sectors.\n", SectorCount);
139
140 //
141 // Attempt to allocate memory for directory buffer
142 //
143 TRACE("Trying to allocate (DirectoryLength) %d bytes.\n", DirectoryLength);
144 DirectoryBuffer = FrLdrTempAlloc(DirectoryLength, TAG_ISO_BUFFER);
145 if (!DirectoryBuffer)
146 return ENOMEM;
147
148 //
149 // Now read directory contents into DirectoryBuffer
150 //
151 Position.HighPart = 0;
152 Position.LowPart = DirectoryStartSector * SECTORSIZE;
153 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
154 if (Status != ESUCCESS)
155 {
156 FrLdrTempFree(DirectoryBuffer, TAG_ISO_BUFFER);
157 return Status;
158 }
159 Status = ArcRead(DeviceId, DirectoryBuffer, SectorCount * SECTORSIZE, &Count);
161 {
162 FrLdrTempFree(DirectoryBuffer, TAG_ISO_BUFFER);
163 return EIO;
164 }
165
166 *pDirectoryBuffer = DirectoryBuffer;
167 return ESUCCESS;
168}
169
170/*
171 * IsoLookupFile()
172 * This function searches the file system for the
173 * specified filename and fills in an ISO_FILE_INFO structure
174 * with info describing the file, etc. returns ARC error code
175 */
177{
178 PCSTR FullPath = FileName;
180 PCSTR FileNameStr;
181 ULONG i, DirectoryPathLength, DirectorySector, DirectoryLength;
182 PVOID DirectoryBuffer;
183 ULONG NumberOfPathParts;
184 CHAR PathBuffer[261];
185 CHAR* PathPart;
187 BOOLEAN DoFullLookup;
189
190 TRACE("IsoLookupFile() FileName = %s\n", FileName);
191
192 Volume = IsoVolumes[DeviceId];
193
194 /*
195 * Extract the file name
196 * '\test.ini' --> 'test.ini'
197 * '\folder\app.exe' --> 'app.exe'
198 */
199 FileNameStr = IsoLastPathSeparator(FileName) + 1;
200
201 /*
202 * Extract the directory path, including trailing slash
203 * '\test.ini' --> '\'
204 * '\folder\app.exe' --> '\folder\'
205 */
206 DirectoryPathLength = FileNameStr - FileName;
207
208 /* See if this directory has been buffered before */
209 DoFullLookup = (DirectoryPathLength != Volume->DirectoryPathLength) ||
210 !RtlEqualMemory(FileName, Volume->DirectoryPath, DirectoryPathLength);
211 if (!DoFullLookup)
212 {
213 PathPart = (CHAR*)FileNameStr;
214 DirectoryBuffer = Volume->DirectoryBuffer;
215 DirectoryLength = Volume->DirectoryLength;
216
217 NumberOfPathParts = 1;
218 }
219 else
220 {
221 PathPart = PathBuffer;
222 DirectorySector = Volume->PvdDirectorySector;
223 DirectoryLength = Volume->PvdDirectoryLength;
224
225 /* Skip leading path separator, if any */
226 if (*FileName == '\\' || *FileName == '/')
227 ++FileName;
228 PathPart[0] = ANSI_NULL;
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 /* Re-map the attributes to ARC file attributes */
302 FileAttributes = IsoFileInfo->Attributes;
303 IsoFileInfo->Attributes = ReadOnlyFile;
305 IsoFileInfo->Attributes |= HiddenFile;
307 IsoFileInfo->Attributes |= DirectoryFile;
308
309 /* Copy the file name, perhaps truncated */
310 IsoFileInfo->FileNameLength = (ULONG)strlen(PathPart);
311 IsoFileInfo->FileNameLength = min(IsoFileInfo->FileNameLength, sizeof(IsoFileInfo->FileName) - 1);
312 RtlCopyMemory(IsoFileInfo->FileName, PathPart, IsoFileInfo->FileNameLength);
313
314 return ESUCCESS;
315}
316
317static
319{
322 return ESUCCESS;
323}
324
325static
327{
329
331 Information->EndingAddress.LowPart = FileHandle->FileSize;
332 Information->CurrentAddress.LowPart = FileHandle->FilePointer;
333
334 /* Set the ARC file attributes */
335 Information->Attributes = FileHandle->Attributes;
336
337 /* Copy the file name, perhaps truncated, and NUL-terminated */
338 Information->FileNameLength = min(FileHandle->FileNameLength, sizeof(Information->FileName) - 1);
339 RtlCopyMemory(Information->FileName, FileHandle->FileName, Information->FileNameLength);
340 Information->FileName[Information->FileNameLength] = ANSI_NULL;
341
342 TRACE("IsoGetFileInformation(%lu) -> FileSize = %lu, FilePointer = 0x%lx\n",
343 FileId, Information->EndingAddress.LowPart, Information->CurrentAddress.LowPart);
344
345 return ESUCCESS;
346}
347
348static
350{
352 ULONG DeviceId;
354
355 if (OpenMode != OpenReadOnly)
356 return EACCES;
357
358 DeviceId = FsGetDeviceId(*FileId);
359
360 TRACE("IsoOpen() FileName = %s\n", Path);
361
363 if (!FileHandle)
364 return ENOMEM;
365
366 Status = IsoLookupFile(Path, DeviceId, FileHandle);
367 if (Status != ESUCCESS)
368 {
370 return ENOENT;
371 }
372
374 return ESUCCESS;
375}
376
377static
379{
382 UCHAR SectorBuffer[SECTORSIZE];
384 ULONG DeviceId;
385 ULONG SectorNumber;
386 ULONG OffsetInSector;
387 ULONG LengthInSector;
388 ULONG NumberOfSectors;
390
391 TRACE("IsoRead() Buffer = %p, N = %lu\n", Buffer, N);
392
393 DeviceId = FsGetDeviceId(FileId);
394 *Count = 0;
395
396 //
397 // If the user is trying to read past the end of
398 // the file then return success with Count == 0.
399 //
400 if (FileHandle->FilePointer >= FileHandle->FileSize)
401 {
402 return ESUCCESS;
403 }
404
405 //
406 // If the user is trying to read more than there is to read
407 // then adjust the amount to read.
408 //
409 if (FileHandle->FilePointer + N > FileHandle->FileSize)
410 {
411 N = FileHandle->FileSize - FileHandle->FilePointer;
412 }
413
414 //
415 // Ok, now we have to perform at most 3 calculations
416 // I'll draw you a picture (using nifty ASCII art):
417 //
418 // CurrentFilePointer -+
419 // |
420 // +----------------+
421 // |
422 // +-----------+-----------+-----------+-----------+
423 // | Sector 1 | Sector 2 | Sector 3 | Sector 4 |
424 // +-----------+-----------+-----------+-----------+
425 // | |
426 // +---------------+--------------------+
427 // |
428 // N -----------------+
429 //
430 // 1 - The first calculation (and read) will align
431 // the file pointer with the next sector
432 // boundary (if we are supposed to read that much)
433 // 2 - The next calculation (and read) will read
434 // in all the full sectors that the requested
435 // amount of data would cover (in this case
436 // sectors 2 & 3).
437 // 3 - The last calculation (and read) would read
438 // in the remainder of the data requested out of
439 // the last sector.
440 //
441
442
443 //
444 // Only do the first read if we
445 // aren't aligned on a cluster boundary
446 //
447 if (FileHandle->FilePointer % SECTORSIZE)
448 {
449 //
450 // Do the math for our first read
451 //
452 SectorNumber = FileHandle->FileStart + (FileHandle->FilePointer / SECTORSIZE);
453 OffsetInSector = FileHandle->FilePointer % SECTORSIZE;
454 LengthInSector = min(N, SECTORSIZE - OffsetInSector);
455
456 //
457 // Now do the read and update Count, N, FilePointer, & Buffer
458 //
459 Position.HighPart = 0;
460 Position.LowPart = SectorNumber * SECTORSIZE;
461 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
462 if (Status != ESUCCESS)
463 {
464 return Status;
465 }
466 Status = ArcRead(DeviceId, SectorBuffer, SECTORSIZE, &BytesRead);
467 if (Status != ESUCCESS || BytesRead != SECTORSIZE)
468 {
469 return EIO;
470 }
471 RtlCopyMemory(Buffer, SectorBuffer + OffsetInSector, LengthInSector);
472 *Count += LengthInSector;
473 N -= LengthInSector;
474 FileHandle->FilePointer += LengthInSector;
475 Buffer = (PVOID)((ULONG_PTR)Buffer + LengthInSector);
476 }
477
478 //
479 // Do the math for our second read (if any data left)
480 //
481 if (N > 0)
482 {
483 //
484 // Determine how many full clusters we need to read
485 //
486 NumberOfSectors = (N / SECTORSIZE);
487
488 SectorNumber = FileHandle->FileStart + (FileHandle->FilePointer / SECTORSIZE);
489
490 //
491 // Now do the read and update Count, N, FilePointer, & Buffer
492 //
493 Position.HighPart = 0;
494 Position.LowPart = SectorNumber * SECTORSIZE;
495 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
496 if (Status != ESUCCESS)
497 {
498 return Status;
499 }
500 Status = ArcRead(DeviceId, Buffer, NumberOfSectors * SECTORSIZE, &BytesRead);
501 if (Status != ESUCCESS || BytesRead != NumberOfSectors * SECTORSIZE)
502 {
503 return EIO;
504 }
505
506 *Count += NumberOfSectors * SECTORSIZE;
507 N -= NumberOfSectors * SECTORSIZE;
508 FileHandle->FilePointer += NumberOfSectors * SECTORSIZE;
509 Buffer = (PVOID)((ULONG_PTR)Buffer + NumberOfSectors * SECTORSIZE);
510 }
511
512 //
513 // Do the math for our third read (if any data left)
514 //
515 if (N > 0)
516 {
517 SectorNumber = FileHandle->FileStart + (FileHandle->FilePointer / SECTORSIZE);
518
519 //
520 // Now do the read and update Count, N, FilePointer, & Buffer
521 //
522 Position.HighPart = 0;
523 Position.LowPart = SectorNumber * SECTORSIZE;
524 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
525 if (Status != ESUCCESS)
526 {
527 return Status;
528 }
529 Status = ArcRead(DeviceId, SectorBuffer, SECTORSIZE, &BytesRead);
530 if (Status != ESUCCESS || BytesRead != SECTORSIZE)
531 {
532 return EIO;
533 }
534 RtlCopyMemory(Buffer, SectorBuffer, N);
535 *Count += N;
536 FileHandle->FilePointer += N;
537 }
538
539 TRACE("IsoRead() done\n");
540
541 return ESUCCESS;
542}
543
544static
546{
548 LARGE_INTEGER NewPosition = *Position;
549
550 switch (SeekMode)
551 {
552 case SeekAbsolute:
553 break;
554 case SeekRelative:
555 NewPosition.QuadPart += (ULONGLONG)FileHandle->FilePointer;
556 break;
557 default:
558 ASSERT(FALSE);
559 return EINVAL;
560 }
561
562 if (NewPosition.HighPart != 0)
563 return EINVAL;
564 if (NewPosition.LowPart >= FileHandle->FileSize)
565 return EINVAL;
566
567 FileHandle->FilePointer = NewPosition.LowPart;
568 return ESUCCESS;
569}
570
572{
573 IsoClose,
575 IsoOpen,
576 IsoRead,
577 IsoSeek,
578 L"cdfs",
579};
580
581const DEVVTBL* IsoMount(ULONG DeviceId)
582{
584 PPVD Pvd = (PPVD)Buffer;
586 ULONG Count;
589
590 TRACE("Enter IsoMount(%lu)\n", DeviceId);
591
592 /*
593 * Read the Primary Volume Descriptor
594 */
595 Position.HighPart = 0;
596 Position.LowPart = 16 * SECTORSIZE;
597 Status = ArcSeek(DeviceId, &Position, SeekAbsolute);
598 if (Status != ESUCCESS)
599 return NULL;
600 Status = ArcRead(DeviceId, Pvd, SECTORSIZE, &Count);
601 if (Status != ESUCCESS || Count < sizeof(PVD))
602 return NULL;
603
604 /* Check if the PVD is valid */
605 if (!(Pvd->VdType == 1 && RtlEqualMemory(Pvd->StandardId, "CD001", 5) && Pvd->VdVersion == 1))
606 {
607 WARN("Unrecognized CDROM format\n");
608 return NULL;
609 }
610 if (Pvd->LogicalBlockSizeL != SECTORSIZE)
611 {
612 ERR("Unsupported LogicalBlockSize %u\n", Pvd->LogicalBlockSizeL);
613 return NULL;
614 }
615
616 Count = (ULONG)((ULONGLONG)Pvd->VolumeSpaceSizeL * SECTORSIZE / 1024 / 1024);
617 TRACE("Recognized ISO9660 drive, size %lu MB (%lu sectors)\n",
618 Count, Pvd->VolumeSpaceSizeL);
619
621 if (!Volume)
622 return NULL;
623 RtlZeroMemory(Volume, sizeof(*Volume));
624
625 /* Cache the PVD information */
626 Volume->PvdDirectorySector = Pvd->RootDirRecord.ExtentLocationL;
627 Volume->PvdDirectoryLength = Pvd->RootDirRecord.DataLengthL;
628
629 IsoVolumes[DeviceId] = Volume;
630
631 /* Everything OK, return the ISO9660 function table */
632 return &Iso9660FuncTable;
633}
634
635#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:581
static PCSTR IsoLastPathSeparator(_In_ PCSTR Path)
Definition: iso.c:46
static ARC_STATUS IsoSeek(ULONG FileId, LARGE_INTEGER *Position, SEEKMODE SeekMode)
Definition: iso.c:545
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:176
static ARC_STATUS IsoGetFileInformation(ULONG FileId, FILEINFORMATION *Information)
Definition: iso.c:326
#define SECTORSIZE
Definition: iso.c:27
static ARC_STATUS IsoBufferDirectory(ULONG DeviceId, ULONG DirectoryStartSector, ULONG DirectoryLength, PVOID *pDirectoryBuffer)
Definition: iso.c:126
#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:571
struct _ISO_VOLUME_INFO * PISO_VOLUME_INFO
static ARC_STATUS IsoRead(ULONG FileId, VOID *Buffer, ULONG N, ULONG *Count)
Definition: iso.c:378
static ARC_STATUS IsoOpen(CHAR *Path, OPENMODE OpenMode, ULONG *FileId)
Definition: iso.c:349
static ARC_STATUS IsoClose(ULONG FileId)
Definition: iso.c:318
#define _stricmp
Definition: cat.c:22
Definition: bufpool.h:45
LPWSTR Name
Definition: desk.c:124
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define L(x)
Definition: resources.c:13
#define ROUND_UP(n, align)
Definition: eventvwr.h:34
@ DirectoryFile
Definition: fatprocs.h:1047
struct _FileName FileName
Definition: fatprocs.h:897
_Must_inspect_result_ _In_opt_ PFLT_INSTANCE _Out_ PHANDLE _In_ ACCESS_MASK _In_ POBJECT_ATTRIBUTES _Out_ PIO_STATUS_BLOCK _In_opt_ PLARGE_INTEGER _In_ ULONG FileAttributes
Definition: fltkernel.h:1236
_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
#define ISO_ATTR_HIDDEN
Definition: iso.h:92
#define ISO_ATTR_DIRECTORY
Definition: iso.h:93
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
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
@ ReadOnlyFile
Definition: arc.h:78
@ HiddenFile
Definition: arc.h:79
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:102
ULONG FileNameLength
Definition: iso.h:104
ULONG FileStart
Definition: iso.h:100
ULONG FileSize
Definition: iso.h:101
UCHAR Attributes
Definition: iso.h:105
CHAR FileName[RTL_FIELD_SIZE(FILEINFORMATION, FileName)]
Definition: iso.h:106
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:320
unsigned char UCHAR
Definition: xmlstorage.h:181
char CHAR
Definition: xmlstorage.h:175