Usage of Win32APIs CreateFile(),WriteFile() and ReadFile()
-
Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?
I suggest the documentation for these functions on MSDN. Go to http://msdn.microsoft.com/en-us/library/default.aspx[^] and type the name of the function in the search box.
-
Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?
You can find your answer in MSDN.
-
Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?
Yes. :rolleyes:
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
You can find your answer in MSDN.
-
ratprita wrote:
I need code urgently.
:-D BTW: its a quite simple task and you're a developer, aren't you? The documentation is your best friend. :)
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles] -
Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?
-
Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?
A list box or an edit box? A list box is not some sort of a "text container" that you can dump text into. So, you'll have to do a bit of work (parse entries and add it to the list box). I'm sure all those functions are documented and there are plenty of examples out there. Not to mention if you're using MFC, things will be easier.
It is a crappy thing, but it's life -^ Carlo Pallini
-
Anyone know the code for creating a file using CreateFile(), Writing the listbox contents into the file using WriteFile() and reading the contents of the file into a listbox using ReadFile() ?
you can use struct.
-
you can use struct.
wangningyu wrote:
you can use struct.
:doh: That is about as useful as telling him to use butter and cheese.
-
wangningyu wrote:
you can use struct.
:doh: That is about as useful as telling him to use butter and cheese.
At least your suggestion leads to a sandwich. Mmmm, food... Iain.
I have now moved to Sweden for love (awwww). If you're in Scandinavia and want an MVP on the payroll (or happy with a remote worker), or need contract work done, give me a job! http://cv.imcsoft.co.uk/[^]
-
wangningyu wrote:
you can use struct.
:doh: That is about as useful as telling him to use butter and cheese.
Michael Schubert wrote:
That is about as useful as telling him to use butter and cheese.
I guess butter & cheese are more useful. :-D
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler. -- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong. -- Iain Clarke
[My articles]