Click here to Skip to main content
16,017,922 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
How to use WriteFile() function in QT??
Posted

What's your problem exactly ? Did you include windows.h ?
 
Share this answer
 
Comments
Gokulnath007 18-Feb-11 3:37am    
No.. I need that to be platform independent.. so i wont use windows.h.. any header is available in Qt to implement this WriteFile() function in Qt
This site will surely be of some interest to you: http://www.digitalfanatics.org/projects/qt_tutorial/chapter08.html[^].

Quote from the site: "This chapter is about files and actions associated with files. It will cover the important parts of Qt's platform independent file and file system classes. After each introduction of the classes some actual code is used to further demonstrate the use of the classes."

Looks promising to me but have a look yourself.

Best Regards,
Manfred
 
Share this answer
 
Comments
Gokulnath007 18-Feb-11 5:03am    
No man... that doesnt satisfied my requirements.. I just to use QFile file();
In this, i want to pass the HANDLE of the file as input to the file() function.. that s the file name itself..
Manfred Rudolf Bihy 18-Feb-11 6:18am    
Sorry but I can't understand your comment. Maybe it would be better if you modified your question to better reflect what your exact requirements are. Give us a code example in your question (Link "Improve question") that reflects what you are trying to do. I also strongly advise you to read the CP documentation on "How to ask a question". Maybe you'll get better resposens if you ask better defined questions.
Harrison H 18-Feb-11 10:11am    
Are you asking how to use a FILE* in the wrapper class QFile?

Google "Class Name 4.7" and you'll get their latest documentation. For example, this is what I get.

http://doc.qt.nokia.com/4.7-snapshot/qfile.html

Looking in that document it is very clear how to use the class.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900