Jump to content
  • Advertisement

Archived

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

john_deimos

Question About HFile - Win32

This topic is 5484 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

According to the MSDN Library for Win32 Simple Data Type page, it says "HFile Handle to a file opened by OpenFile, not CreateFile." Now, I am using VS 6.0 and according to MSDN, OpenFile is obsolete and I should use CreateFile. I am confused now. So should I call OpenFile or CreateFile? Thank you in advance for your time.

Share this post


Link to post
Share on other sites
Advertisement
Call CreateFile(). It''ll return a HANDLE.

OpenFile() is from Windows 3.1, and it''s only retained for backwards compatibilty so that you can run ancient apps on new operating systems.

The comment for HFILE in the docs is merely indicating that the CreateFile() function doesn''t return a HFILE. It''s not suggesting that you shouldn''t use that function.

--
Simon O''Connor
Creative Asylum Ltd
www.creative-asylum.com

Share this post


Link to post
Share on other sites
The OpenFile is only for compatibility with old 16-bit Windows, so the programs could be compiled with no changes. If writing new application, you should use CreateFile

SLLOWWW

[edited by - MrAndrew on June 19, 2003 2:45:55 PM]

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!