|
Yes,
Any solution for this?
Anu
|
|
|
|
|
After each value that you write in a file put a comma ',' as a delimiter.Split the string of the file based on that ','.
Another option would be to read and write the full structure at a time and get/set the values in the file.(Use fread in this case)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Can u tell me why its not read in this code..
float fScaleLow,fScaleHigh,fAlarmLow,fAlarmHigh;
cfTag.Read(&fScaleLow,sizeof(float));
cfTag.Read(&fScaleHigh,sizeof(float));
cfTag.Read(&fAlarmLow,sizeof(float));
cfTag.Read(&fAlarmHigh,sizeof(float));
its read the wrong value..
Pls..
Anu
|
|
|
|
|
As it seems, the value in the file is a string.
If that is the case (and cfTag.Read is a functions to read a string from a file into a given char array), you are using it wrong. You should probably use something around the lines of (thats a guess):
char tScaleLow[TSCALELENGTH]; and<br />
cfTag.Read(tScaleLow,sizeof(char) * TSCALELENGTH);
Actually, without a definition of cfTag.Read, there is no way to tell what you are doing wrong, but I really suspect wrong use of "Read" to be the reason.
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
Hi all,
I hope you can give me a hint or help about a debugging issue.
Out of a minidump I got from a release build, the problem showed as follows:
The stack in VC++ debugger when opening the .dmp file, showed:
0x00000000
and nothing else. EIP of course also contained NULL.
I then looked at the ESP address to see the stack. There I found the jump-back address to see where the code would continue if the jump that now occurred to 0x00000000 would have been successful.
The C++ code there looks like the following:
if (variable && variable->SomeFunction() && .....)
"variable" is a pointer to an object of a class.
The question now is, how can I debug that further. Did "variable" maybe not contain - for some reason - a pointer to an object of the class it should point to where the offset to ->SomeFunction() would be NULL ?
Any idea how, for the next iteration of the release software, some code could be added to give more information about the problem - if it still crashes there ?
Thanks for any help,
Manfred
|
|
|
|
|
|
Well, I guess this won't help me when the EIP actually jumped to 00000000
I used the PDB anyway which got me enough information to find the code where the offending jump occured.
icke
|
|
|
|
|
Hi all,
all the links that appear in CRichEdit Ctrl are based on the window scheme i am using.
is there a way to tell the rich edit that all my link will apear in a blue color regardless the window scheme i am using?
thanks in advanced
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
Hi all,
i play a sound using:
PlaySound(MAKEINTRESOURCE(IDR_WAVE),AfxGetInstanceHandle(),SND_PURGE | SND_RESOURCE | SND_ASYNC);
i stop this sound using:
PlaySound(NULL,AfxGetInstanceHandle(),SND_PURGE | SND_RESOURCE | SND_ASYNC);
But when i call the above line again (PlaySound with NULL), the sound is being played again
is there a way to avoid this problem?
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
If you run PlaySound(null,SND_PURGE); whats happen?
|
|
|
|
|
you mean exactly as you wrote? hmm didn't give it a try , will do and let u know
thanks
Yaron
Interface basics click here :
http://www.codeproject.com/com/COMBasics.asp
don't forget to vote
|
|
|
|
|
WhiteSky wrote: If you run PlaySound(null,SND_PURGE);whats happen?
Where's the third argument?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi DavidCrow
wow David do you remember when i said to you one thing in The Lounge my guess was right but you said no but i said its fact .PlaySound(NULL,NULL,SND_PURGE);
|
|
|
|
|
WhiteSky wrote: David do you remember when i said to you one thing in The Lounge...
Are you referring to this? If so, I fail to see your point.
WhiteSky wrote: ...my guess was right...
About what?
WhiteSky wrote: PlaySound(NULL,NULL,SND_PURGE);
In your reply here, you only provided two arguments to PlaySound(). I "corrected" you by asking about the missing argument. What part of that did you not understand?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I underestood your answer and got it ok and thanks.
--------------------
yes,you see a right point but Im wondering for a new thing the date from that message is 20 Jul and now is 5 Sep about two months ago it past very fast
|
|
|
|
|
hi all,
again i got this error
error LNK2001: unresolved external symbol _strnicmp
which library to link ?
plz help me
regards
venu
|
|
|
|
|
Hi,
good question ...
a) libc.lib -> single threaded, static link
b) libcmt.lib -> multithreaded, static link
c) msvcrt.lib -> multithreaded, dynamic link
and for debugging versions
libcd.lib
libcmtd.lib
msvcrtd.lib
HTH
Frank
|
|
|
|
|
hi Frank,
thank you for reply..
still i am getting this error
fatal error LNK1104: cannot open file libcd.lib
fatal error LNK1104: cannot open file libcmtd.lib
fatal error LNK1104: cannot open file 'msvcrtd.lib
do i need to add any include path ?
regards
venu
|
|
|
|
|
Are you sure File is exist and path is correct?
|
|
|
|
|
Hi,
you need only one of this libraries. Each of this libraries has the "same" functions, but for other threading and linking!
Include path:
Version 1: (for the studio)
Tools->Options
Dialog-Tab: Directories
Choose: Library Files
and add the directory from the lib
Version 2: (only the project)
Use Project-->Settings-->Link-->Object\Library module edit box.
the correct path for you = ???
-> search for one of this files
-> possible results:
c:\program files\Microsoft Visual Studio\VC98\Lib
c:\program files\Microsoft SDK\lib
If you found more than one locations, use the newest versions. (e.g. SDK -> include order)
HTH
Frank
|
|
|
|
|
I Have SDI application with form view.
In that form view have tree control.
In tree control some items exist.
Now what i want is.....
if item is related to doc file then i double
click on that item, that item will be opened with
Microsoft word.
How can i do it?
|
|
|
|
|
kiranin wrote: if item is related to doc file then i double
click on that item, that item will be opened with
Microsoft word.
How can i do it?
Can't you simply use ShellExecute() ?
"Talent without discipline is like an octopus on roller skates. There's plenty of movement, but you never know if it's going to be forward, backwards, or sideways." - H. Jackson Brown, Jr.
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Do you want to run like explorer for example if you dclick in a doc then this file open with wordpad or txt with Notepad and...,right?
|
|
|
|
|
ya u r right. But i want to work it in my application
|
|
|
|
|
Its a suggestion I think you can see extensions in registry each extenstion has a program that open it now when you dclick in your treectrl you cna check registry for it extenstion for example bmp has Paint.exe or doc
Wordpad
|
|
|
|