[ros-dev] Re: [ros-svn] [ion] 15178: Make the remaning code match
the current formatting instead of being really ugly,
and make some changes
to IoCreateFileStreamObject (which is wrong anyways,
since it's doing what *Lite should do)
Hartmut Birr
hartmut.birr at gmx.de
Tue May 10 02:00:52 CEST 2005
Hi,
if I open a file in kernel mode on XP with:
RtlInitUnicodeString(&FileName, L"\\??\\c:\\freeldr.ini");
InitializeObjectAttributes(&ObjectAttributes,
&FileName,
OBJ_CASE_INSENSITIVE,
NULL,
NULL);
Status = ZwOpenFile(&FileHandle,
GENERIC_READ,
&ObjectAttributes,
&IoStatusBlock,
0,
0 /* FILE_SYNCHRONOUS_IO_NONALERT*/);
Status = ObReferenceObjectByHandle(FileHandle,
GENERIC_READ,
IoFileObjectType,
KernelMode,
(PVOID)&FileObject,
NULL);
I see FileObje->Flags is FO_HANDLE_CREATED|FO_CACHE_SUPPORTED. Than I
create a stream file object from FileObject->DeviceObect:
StreamFileObject = IoCreateStreamFileObject(NULL,
FileObject->DeviceObject);
I see StreamFileObject->Flags is FO_HANDLE_CREATED|FO_STREAM_FILE.
- Hartmut
Alex Ionescu wrote:
> ion at svn.reactos.com wrote:
>
>> Make the remaning code match the current formatting instead of being
>> really ugly,
>
>
>> and make some changes to IoCreateFileStreamObject (which is wrong
>> anyways, since it's doing what *Lite should do)
>>
>>
>>
> This breaks usetup/vfat/whatever. I'll fix it until I have time to
> look at the whole picture. (Well actually I'll add back the incorrect
> parts of the code :P)
>
> Best regards,
> Alex Ionescu
> _______________________________________________
> Ros-dev mailing list
> Ros-dev at reactos.com
> http://reactos.com:8080/mailman/listinfo/ros-dev
>
>
More information about the Ros-dev
mailing list