|
When writing, are you using the CreateFile() and CloseHandle() pair for each file before
moving on to the next file?
Also, I'm pretty sure the files will be found with FindFirstFile() before they are closed
(they show up in explorer while being written ).
Does the reader take this into account, possibly looking for a failure to open due to no shared access?
Mark
|
|
|
|
|
Wouldn't it be easier for the first application to just send a simple message to the second application telling it that file X is finished? Otherwise, FindFirstFile() is going to find files that exist but are empty or locked.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You better write the files one by one with *.tmp extension and when ready rename it. This makes sure that only ready files are found.
Greetings from Germany
|
|
|
|
|
Hello
I want to work with files unmanaged.
I've been using fstream for file i/o but the problem is that if the file is greater than the maximum value of long I am not able to seek within it since the offset in the seek command doesn't accept values greater than long.
Is there any other way I should work with files ? (unmanaged, not using system.dll)
Clint
|
|
|
|
|
|
Has Windows Vista got graphics routines to read from JPG images to internal image mode, and to output from internal image mode into JPG mode? If so, how does Visual C++ call those routines?
|
|
|
|
|
GDI+[^] wll handle JPEGs plus several other types.
It's included on XP+ operating systems and available as a redistributable for versions
back to Windows 98.
If you use the CImage class[^], which uses GDI+ to load and save images,
you can load and save images with just a couple lines of code.
You can also look at the CImage class source code to see how it uses GDI+.
Mark
|
|
|
|
|
So far my atempts at telling Visual C++ programs to display text have displayed mostly Chinese characters, mixed with occasional Japanese katakana and Arabic letters.
I have realised that I may have run foul of a confusion between the ordinary 8-bit characters that I have known since the beginnings of desktop computers, and the Windows 16-bit characters that include national character sets (including Chinese characters). Please, starting with
char*s = "The quick brown fox jumps over the lazy dog's back.";
(which is 51 characters (not counting the terminating /000 character)), how can I tell the program to convert that into the Roman-alphabet 16-character form so the program will display that in the Roman alphabet?
|
|
|
|
|
I don't know, ever heard of UNICODE ?
on another tangent, there is a macro, I think, called A2W that converts LPSTR to LPWSTR, you can start by looking at those and start your education from there.
|
|
|
|
|
I need a small function or code to do interpolation. Knowing Y(Xi) to fine y(x) for a give x.
If you have a code please share with me.
Thanks
|
|
|
|
|
I know you get fast service here, but surely google is faster: link[^]
Peter
"Until the invention of the computer, the machine gun was the device that enabled humans to make the most mistakes in the smallest amount of time."
|
|
|
|
|
y = (x-x1)*(y2-y1)/(x2-x1)+y1;
|
|
|
|
|
Thanks for your message.
I know the math behind a interpolation. Now I am looking a ready code or function.
|
|
|
|
|
He's given you the code. Just wrap that into a function, with the relevant parameters, returning the relevant result.
Barring him coming round to your office desk, there's not much more he can do for you.
Iain.
|
|
|
|
|
Interpolation is heavy duty if you have complex functions. You better implement an acurate function.
Greetings from Germany
|
|
|
|
|
Thanks and greeting from US.
I am looking for some code and save me to write again.
|
|
|
|
|
If you need an interpolation function, you need to specify what exactly you need to interpolate.
Ie. Linear? Quadratic? Cubic? Higher Polynomials?
|
|
|
|
|
Thanks.
Spline will be good.
|
|
|
|
|
I often copy a full directory of a proiject to another director and change the programs
to another application, but I still have to use the same project name. When I got the new compiled
excutable file. its name is still the same as the old one.
This is a MFC program project. I do want to change the project name and get new name for the new application. I do not knw how to change the project and program excutable names.
Thanks
|
|
|
|
|
Edit the project setting: Linker/General/Output File
It may be a good idea to go through all the settings of the copied project and
make sure there's no settings that still relate to the old project
Mark
|
|
|
|
|
|
How can a program detect that the local computer is connected to a network ? In VC++6 please...
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
See here.
"Normal is getting dressed in clothes that you buy for work and driving through traffic in a car that you are still paying for, in order to get to the job you need to pay for the clothes and the car and the house you leave vacant all day so you can afford to live in it." - Ellen Goodman
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Nice stuff!
36. When you surround an army, leave an outlet free.
...
Do not press a desperate foe too hard.
SUN-TZU - Art of War
|
|
|
|
|
Some networking stuff in VS2003: http://www.codeproject.com/KB/IP/INetCfg_Explorer.aspx
Greetings from Germany
|
|
|
|