Archived

This topic is now archived and is closed to further replies.

Information on _lread, _lseek and _lclose

This topic is 6385 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''m reading the source code in my game programming book for loading in a bitmap, and I came across _lread, seek and close. I have never even seen these in any programming book, so naturally, I''m unfamiliar with how to use them. Can anyone point me towards an explanation of these functions (?), because I always like to know EXACTLY what is going on when I am programming. Thanks a bunch! There are three types of people in the world; those who can count, and those who can't.

Share this post


Link to post
Share on other sites
all three functions pertain to file access. You should note that these functions are only provided for 16 bit compatibility. When programming Windows you should use ReadFile, CreateFile, and CloseHandle (but who actually does that?).

close : this function closes the opened file
lseek : this goes to a specific point in the file. for an explination as to why this is done you should refer to your book.
lread : read from the current position in the file.

Share this post


Link to post
Share on other sites
That''s great, thankyou for your help, but I was looking for more of an explanation of the functions, how to use them and so on. The programming book that I have doesn''t have any sort of explanation, thus, I''m trying to find some tutorials on these functions..

There are three types of people in the world; those who can count, and those who can't.

Share this post


Link to post
Share on other sites
Just look in MSDN. They have complete descriptions of the functions.

--------------------------------------------------------
Working on creating the worlds first 4D engine!

Share this post


Link to post
Share on other sites
Thanks! Um... I feel kind of dumb asking this, but where can I find the MSDN? I keep hearing about it, but I''ve never actually used it..

Share this post


Link to post
Share on other sites
Here it is: MSDN Library You usually also get it on CD together with any Visual Studio product.

Now for another matter, why did you think this question should be posted in the DirectX/OpenGL/Glide/Genesis3D forum? I hope you don''t take offense but this has obviously nothing to do with any of those API''s. (I''m moving the post to a better forum)

- WitchLord

Share this post


Link to post
Share on other sites
Thanks for all your help!!

Does _lread, _lseek and _lclose used with DirectDraw to load in a bitmap? Yes. Since it is used with DirectDraw, it should be put in that forum- regular programming does not use DirectDraw which was part of my question, so I decided to put it there. It doesn''t matter, you answered the question! Sorry to have causes you grief..

There are three types of people in the world; those who can count, and those who can't.

Share this post


Link to post
Share on other sites
Wow... MSDN is huge- can you give me some sort of description of where to find it?

There are three types of people in the world; those who can count, and those who can't.

Share this post


Link to post
Share on other sites
Since they''re generic windows replacements for the standards (under win16 the standards wouldn''t work, the reason I forget), try Platform SDK->Basic junk->File I/O in the library.Note that under win32 you can use the standard functions fread(), seek(), and fclose()-- they essentially do the same thing.
If you don''t have win32 api documentation, you should get it, there''s too much stuff to remember.I prefer the help file that comes with lcc-win32 (the old-style .hlp files are easier and faster to navigate then .chm files, don''t you think?) (12 mb .hlp file):

ftp://ftp.cs.virginia.edu/pub/lcc-win32/win32hlp.exe

Good luck :-)

----------
meh

Share this post


Link to post
Share on other sites
Great, thanks! I can finally get on with my programming Thankyou all... I haven't checked it yet since I'm at school (I finished my exam early... it was too easy), but I'll look at it when I get home. Again, thanks for all your help!

There are three types of people in the world; those who can count, and those who can't.



Edited by - Fredric on June 21, 2000 6:13:53 PM

Share this post


Link to post
Share on other sites