Software & Application Miscellaneous: ZwReadFile?

  • anonymous / 205 / Sat, 20 Jun 2009 12:07:00 GMT / Comments (1)
  • Hi.

    I could be able to read the contents from the file from the kernel mode...
    It reads in ASCII format ...
    How to make it read in the same format as it is in the file?

    The code I have used is..

    ntStatus = ZwCreateFile( &NtFileHandle,
    SYNCHRONIZE | FILE_READ_DATA, // I have tried
    with GENERIC_READ also...
    &ObjectAttributes,
    &IoStatus,
    NULL, // alloc size
    =none
    FILE_ATTRIBUTE_NORMAL,
    FILE_SHARE_READ,
    FILE_OPEN,
    FILE_SYNCHRONOUS_IO_NONALERT |
    FILE_NON_DIRECTORY_FILE,
    NULL, // eabuffer
    0 ); // ealength

    ntStatus = ZwReadFile( NtFileHandle,
    NULL,
    NULL,
    NULL,
    &IoStatus,
    FileImage, // Read Buffer
    LengthOfFile,
    NULL,
    NULL );

    where to make the change to read it in AlphaNumeric mode... ( ie I want the
    content of the Read Buffer[FileImage] in Alphanumeric format)?

    Regards,
    Anand.
  • Keywords:

    zwreadfile, software, application

  • http://software.itags.org/software-application/240753/«« Last Thread - Next Thread »»
    1. Hello,

      You mean alpha numeric mode? You mean as you would in fopen("filename.txt",
      "rt") ?

      After you read into the buffer, you can parse into lines by looking for \n
      or \r\n combinations.
      --
      Elias
      "Anand Kalyan" <kanand...sstil.com> wrote in message
      news:uEvf2A4yDHA.2452...tk2msftngp13.phx.gbl...
      > Hi.
      > I could be able to read the contents from the file from the kernel mode...
      > It reads in ASCII format ...
      > How to make it read in the same format as it is in the file?
      > The code I have used is..
      > ntStatus = ZwCreateFile( &NtFileHandle,
      > SYNCHRONIZE | FILE_READ_DATA, // I have tried
      > with GENERIC_READ also...
      > &ObjectAttributes,
      > &IoStatus,
      > NULL, // alloc size
      > =none
      > FILE_ATTRIBUTE_NORMAL,
      > FILE_SHARE_READ,
      > FILE_OPEN,
      > FILE_SYNCHRONOUS_IO_NONALERT |
      > FILE_NON_DIRECTORY_FILE,
      > NULL, // eabuffer
      > 0 ); // ealength
      >
      > ntStatus = ZwReadFile( NtFileHandle,
      > NULL,
      > NULL,
      > NULL,
      > &IoStatus,
      > FileImage, // Read Buffer
      > LengthOfFile,
      > NULL,
      > NULL );
      > where to make the change to read it in AlphaNumeric mode... ( ie I want
      the
      > content of the Read Buffer[FileImage] in Alphanumeric format)?
      > Regards,
      > Anand.
      >

      lallous | Tues, 20 May 2008 08:09:00 GMT |

  • Software & Application Miscellaneous Questions

    • ZSyncer and ZEO

      I noted that and will upgrade in this round. It's the old problem ofhaving live systems, distri...

      By dennisallison

    • ZSyncer and ZEO

      Furher investigation has shown that the failing ZSyncer target had aproblem with its authentication ...

      By dennisallison

    • ZSQLRelay Problem

      Hi,My zope server is running on fedore core3. I want to connect to ms sqlserver running on windows x...

      By evrimozcelik

    • ZSQLRelay Problem

      Hi,My zope server is running on fedore core3. I want to connect to ms sqlserver running on windows x...

      By evrimozcelik

    • Zsyncer issue

      (Sorry about the cross post! I did not pay attentionto what I was typing in the address, but perhaps...

      By matthowell, 1 Comments

    • Zsyncer issue

      (Sorry about the cross post! I did not pay attentionto what I was typing in the address, but perhaps...

      By matthowell, 1 Comments

    • Zsyncer issue

      I have not used Zsyncer before, so please excuse me ifthis question is remedial. Would Zsyncer be a ...

      By matthowell, 1 Comments

    • ZSyncer and Zope-2.8.0

      Hi,I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (pagetemplates) between a Zope...

      By thierryflorac, 14 Comments

    • ZSyncer and Zope-2.8.0

      Hi,I'm trying to use ZSyncer 0.6.1 to synchronise simple objects (pagetemplates) between a Zope...

      By thierryflorac, 14 Comments