Question About HFile - Win32
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.
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
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
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]
SLLOWWW
[edited by - MrAndrew on June 19, 2003 2:45:55 PM]
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement