I am using the windows API in C++ and I want to get the content of a specific txt file. I contemplate using the ReadFile function but I don’ t know what I should use in place of HANDLE or, in other words, how I should pass as parameter the name of the txt file. What is the best way generally to get the content of a txt file using windows API.
I am using the windows API in C++ and I want to get the
Share
First, you must invoke
CreateFile(“Creates or opens a file or I/O device“). It returns a handle which you subsequently pass toReadFile.When you are done, don’t forget to call CloseHandle.