Actually I am guilty of not having described my problem sufficiently.
I am not using MFC in my program. I am trying to sterilize everything by using the ofstream::write((char*)&Object, sizeof(object)); That's because I am working on an AutoCAD plug-in that requires an extra bit of gymnastics to use MFC. Also, I did not want to eliminate suggestions by talking too much of my idea of the problem.
But here it is:
I am writing a project handling tool that handles "n" number of files as a project. Data from each file is kept in a structure\class (say FileStruct) in 2 2D arrays and a few strings. I wanted to replace these 2D arrays by vectors. Also the project itself is only a collection of "n" number of FileStructs. So wanted to make a vector out for that as well.
So the final object waiting to be serialized would conceptually look like this:
1) if i want to send 4MB of Data through Socket is there any limitation to send Data towards the Receiver who listen the Socket.
2) why we have to use select(...) in the Socket what is the use.
3) what is the Difference between Blocked and UnBlocked Socket.
4) Why we have the Option FD_SET, What is the Senario to Use this Option.
If you want some help, you have to ask precise questions. Where are you stuck exactly ? What have you already done ? What is the problem with what you already did (errors + details, crash, ...) ?
To start, you can look at the MSDN for CreateFile (opening the port), ReadFile (for reading the port) and ofstream (to save your data to a file).
yeah i've checked MSDN & read CreateFile, ReadFile... but the problem is there's no onearound me who can tell me how to use them in a program. Basically I'm trying to read data from the serial port of my PC. and wanted to make its program. I've searched through Webcrawler.com & checked many links but didn't found how can i use them in the form of a program. so can u please help me with this as i don't have any one who can teach me.
Come on Cedric, on CodeProject it should be a perfectly valid request to ask for the source code for a module or class that can do serial communication. In my mind, he doesn't have to try to make it himself before he asks for an "off-the-shelf" class. His question may not be the best worded one, but this goes for many of us non-native-english speakers.
I know, and I fully agree, that we see some rather stupid requests here at CP from time to time (the guy with about 60 minutes patience comes to mind). I just don't think this is one of them.
"Are you gonna check your makeup when you're done whining?" John Simmons, 05/31/2006
Yes I agree with the part that there are some classes ready on the website.
But he asked also how to save the data, which is generaly not included within these kind of classes.
So, basically he didn't explain where was the problem.
That's way I was asking for more precisions (ok, maybe this sounded a little bit too agressive but it wasn't ).
Steen Krogsgaard wrote:
the guy with about 60 minutes patience comes to mind