|
Mike Dimmick wrote:
Don't use fopen() or the other C runtime file functions from <stdio.h> for reading binary data. They're only designed for use with text files.
Where did you get this from? fopen(), fread(), fwrite(), and fclose() operate on both text files and binary files. They always have.
|
|
|
|
|
DavidCrow wrote:
fopen(), fread(), fwrite(), and fclose() operate on both text files and binary files. They always have.
Don't you have to add a flag or something in order to read binary data?
Perhaps not with the fXXX() family... I don't have MSDN near my hands so I can't check if it is so.
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Rickard Andersson18 wrote:
Don't you have to add a flag or something in order to read binary data?
fopen(szpath,"rb");
b means binary.
Anyway,I find out that was problem with debugger.It contains correct value but debugger can't show it.
Mazy
No sig. available now.
|
|
|
|
|
Mazdak wrote:
It contains correct value but debugger can't show it
Have you tried using any of the m-type symbols in the watch window?
I use these two quite often:
m
ma
I've never used these:
mb
mw
md
mq
mu
|
|
|
|
|
Rickard Andersson18 wrote:
I don't have MSDN near my hands so I can't check if it is so.
If you have access to CodeProject, you have access to MSDN[^]
|
|
|
|
|
DavidCrow wrote:
If you have access to CodeProject, you have access to MSDN
True, but I don't waste any time and money of big loadings at MSDN online with my damn modem!
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Why you don't use the Win32 API functions CreateFile , ReadFile , ... ?
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I use this coed to read files:
FILE *file = fopen(szpath,"rb");
if(file!=NULL)
{
char *svRead;
fseek (file , 0 , SEEK_END);
long lSize = ftell (file);
rewind (file);
svRead = (char*) malloc (lSize);
int i = fread(svRead,sizeof(char),lSize,file);
}
But it works only for TEXT files ad when I read jpg files with it ,it only read 3 or 4 first character.
Mazy
No sig. available now.
|
|
|
|
|
Hi
I use CRecordset to access to MSAccess Database
When I want to access database With ODBC & without CDatabase it work well.
But I want To use db without using ODBC & directly, I used CDatabase To do it but Recordset will readonly
CDatabase Database;
Database.OpenEx("DRIVER={Microsoft Access Driver (*.mdb)};DBQ=DB\\TT.mdb",0);
CMyRecordset rs(&Database);
please Help me
Iman
|
|
|
|
|
searching for a good report-printing c++ library
|
|
|
|
|
How to change the color of a scroll bar's appearance?
Please help me!
stanley
|
|
|
|
|
|
Thanks for your help.;P
stanley
|
|
|
|
|
How can we create a little float window on top of desktop to receive drop from other application?
I can't find any meterial descript it. Maybe i take a wrong express :<
|
|
|
|
|
Take a look at this!
http://www.codeproject.com/tools/ontop.asp[^]
jhaga
CodeProject House, Paul Watson wrote:
...and the roar of John Simmons own personal Nascar parked in the garage. Meg flitting about taking photos.Chris having an heated arguement with Colin Davies and .S.Rod. over egian values. Nish manically typing *censur*. Duncan racing around after his pet *c.* Michael Martin and Bryce loudly yelling *c.* C.G. having a fit as Roger Wright loads up *c.* . Anna waving *c.* and Deb scoffing chocolates in the corner.
..Good heavens!
|
|
|
|
|
A simple question. how to add a new menuitem to IE's right button popup menu?
|
|
|
|
|
|
Hi,
I want to change the Winlogon policy programmatically. This I'm able to do by finding some of the registry entries in the Windows registry which would bring this policy into effect.
But changing this policy through registry don't show the changed status in the windows 2k Local Security Policy snap-in.
What shall I do to reflect this change in the Local Security Policy Snap-in.
Thanks,
Abhishek.
Learning is a never ending process of Life.
|
|
|
|
|
Does anyone know about a tool that can convert a .mak file to a .dsp file?
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
The tool is ............... Visual C++. ;P;P
Run your Visual C++ ... the menu:
File -> Open Workspace ->
Choose the file type to open as Makefile (.mak) or All types (*.*)
......
BuggyMax
|
|
|
|
|
Thats nice.....
OK I wasn't clear enough. I don't want just the .mak file inserted, I want a full .dsp file that contains all the same files as the .mak file so I can get class view, file view and resource view as I do with a regular project created in VC.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
Hi
I can be wrong with this, but is the .mak file a textfile and can't you just rename the .mak to .dsp?
Hope it helps a bit.
Greetings
Jens
|
|
|
|
|
JensB wrote:
can't you just rename the .mak to .dsp
No no no no!
A .mak and .dsp file is NOT the same!
Open a mak file and a dsp file in Notepad and look.
Rickard Andersson8
Here is my card, contact me later!
UIN: 50302279
E-Mail: nikado@pc.nu
Interests: C++, ADO, SQL, Winsock, 0s and 1s
|
|
|
|
|
Have you found the solution?
|
|
|
|
|
I honestly can't remember
My guess would be that I just had to manually add all the files to a new .dsp file. But as I said, I really can't remember.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|