Hi all,
My First Post :)

i am writing a VXD in my VXD i want to Open a file and read the contents

how do i open the file and read the contents
any sample code will be welcome :)

please help
:confused:
Posted on 2004-02-10 07:25:04 by monty
Hello monty,

and welcome on board :grin:

I'm also a great beginner but i think i can help you a bit.

For opening a file you can call OpenFile and CreateFile.

Yes, CreateFile can also open file and is recommended on NT systems. So, use Openfile for older system (win 9X and ME) or for compatibility reason. Once you have call one of those API you'll get a handle in return (if everything was OK).

Once you get your handle you can call ReadFile (or its Extended version ReadFIleEx for asynchronous operations). Once Reafile has successfully ended you can parse the Buffer where data were sent.

Hope it could help. If you use MASM you can take a look at all the examples and also the Iczelion's tutorials.

Maybe it was not what you were expecting...but i'm just a beginner.
Posted on 2004-02-10 21:26:44 by Neitsa
In my option,CreateFile is better.Since it not only can open a file
but devices.See more on MSDN,it vill be helpful.
Posted on 2004-02-10 21:35:56 by Rey