WriteAllBytes.....
-
There is a code line. File.WriteAllBytes("c:\image.raw", abc.rawdata); It was composed by Visual Basic. But I don't know how to change the code by Visual C++. In the start, How should I include library or header file??
-
There is a code line. File.WriteAllBytes("c:\image.raw", abc.rawdata); It was composed by Visual Basic. But I don't know how to change the code by Visual C++. In the start, How should I include library or header file??
You could use the basic file APIs to accomplish this. Look at CreateFile[^], WriteFile[^], CloseHandle[^]. You only need to include Windows.h. You could also use the MFC CFile[^] class.
«_Superman_» I love work. It gives me something to do between weekends.
-
There is a code line. File.WriteAllBytes("c:\image.raw", abc.rawdata); It was composed by Visual Basic. But I don't know how to change the code by Visual C++. In the start, How should I include library or header file??
This is what WriteAllBytes is doing. Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten. You can implement similar functionality using the CFile/CStdioFile or some other MFC class that deals with file reading/writing.
You need to google first, if you have "It's urgent please" mentioned in your question. ;-)_AnShUmAn_