|
Then I'm not sure where the problem lies. Sorry.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
im not sure but i think you have two problems because if your problem was include you get
error C2065 but you get another error error C2057
whitesky
|
|
|
|
|
When i add MSHTML.h file in any application there is shows some error in this file.
syntax error : identifier 'LONG_PTR' i really cannot get what is this error is for what should i include other than this file.
Shikha
Pune
|
|
|
|
|
Shikha Jain wrote: identifier 'LONG_PTR'
identifier LONG_PTR what ????? undefined ? symbol unknown ?
what is the compilation error number, and exact message please ????
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
I think it is defined in basetsd.h header. Just include that header, and it should be fine.
In the Microsoft SDK, it is defined as:
typedef _W64 long LONG_PTR, *PLONG_PTR;
As you can see it is a long in disguise.
this is this.
|
|
|
|
|
Can you be more specific whats application type?
whitesky
|
|
|
|
|
I read from a file , when I reach :
<#if ... #>
when the " ... "(something) is short the fgets function reads true
but when the " ... "(something) is a little longer the fgets function read incorect
what is the problem???
thank you
|
|
|
|
|
if you look at the fgets()[^] function behavior, it waits for a "maximum characters to read" parameter ; so i believe that your problem comes from the length of your buffer (if you read a line which is wider that your buffer, it will be truncated)
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
no , i put n=1000 and ... is less than 100 characters .
and also when i read :
dsalgujbslgkusdhglidsufhgllkufg
it is true but
<#if dsgubsldfjgblfdgbldfgb #>
is false !!!!!!!!!!!!!!!!!!!!!!!!!
i dont know why fgets act like this .
|
|
|
|
|
use you debugger to compare the string you read and what is actually filled in your buffer.
btw, do you have any \n, spaces or escape characters in the string read ?
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
I haven't any '\n' , space and scape . this is what happens :
the file is:
<#if...#>
hello
the code is: --------------- debugger shows :
char string[1000]="";
fgets("adress",1000,input);
fgets("adress",1000,input);
|
|
|
|
|
My be fgets("adress",1000,input) must be replaced with fgets(string,1000,input) ?
|
|
|
|
|
AH ofcourse it was a misprint , it is true in my code .
-- modified at 8:54 Tuesday 6th June, 2006
|
|
|
|
|
Can you post your code ? (With the opening of the file also)
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
how can I post the files to you ?
|
|
|
|
|
Just post the relevant information here (the code snippet that opens and read from the files with the variables that are used). Please use the code tags (above the emoticons)
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
code is :
int main()
{
char khat[1000];
clrscr();
int i;
for(i=0;i<1000;i++) {khat[i]='\0'; if(i<100)counter[i]=0;}
FILE *f;
f=fopen("falle//in2.htm","r");
for(i=1;i<1000;i++)
{
fgets(khat,1000,f);
printf("%s\n",khat);
if(strcmp(khat,"</HTML>")==0) break;
}
fclose(f);
char ch=getch();
if(ch==27) return 0;
return 0;
}
and file is :
<HTML>
<BODY>
<#if( 1+2^3 < 2*(2+3)+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1+1-1 )#>
correct
yes , it is correct
<#fi#>
incorect
<#loop 4#>
this is in the loop
and number is :
<#i#>
<#do#>
</BODY>
</HTML>
|
|
|
|
|
I think you should provide the entire fragment between the line where you open the file (fopen ) and close it (fclose ), and may be a precise content of input file. Perhaps, someone will figure out the problem.
If your program is too big, try to remove (comment) some fragments, keeping file-processing only. Thus you should be able to reproduce the problem for a smaller program.
|
|
|
|
|
How are you verifying the contents of string ?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
hi all,
I have a video player that plays video files(.cam).Everthing is working fine.I can even able to extract audio and save it as .wav file.
This is the code where i record audio .
DWORD CWave::recordWAVEFile(DWORD dwMilliSeconds) <br />
{ <br />
UINT wDeviceID; <br />
DWORD dwReturn; <br />
MCI_OPEN_PARMS mciOpenParms; <br />
MCI_RECORD_PARMS mciRecordParms; <br />
MCI_SAVE_PARMS mciSaveParms; <br />
MCI_PLAY_PARMS mciPlayParms; <br />
<br />
mciOpenParms.lpstrDeviceType = "waveaudio"; <br />
mciOpenParms.lpstrElementName = ""; <br />
if (dwReturn = mciSendCommand(0, MCI_OPEN, <br />
MCI_OPEN_ELEMENT | MCI_OPEN_TYPE, <br />
(DWORD)(LPVOID) &mciOpenParms)) <br />
{ <br />
return (dwReturn); <br />
} <br />
<br />
wDeviceID = mciOpenParms.wDeviceID; <br />
<br />
mciRecordParms.dwTo = dwMilliSeconds; <br />
if (dwReturn = mciSendCommand(wDeviceID, MCI_RECORD, <br />
MCI_TO | MCI_WAIT, (DWORD)(LPVOID) &mciRecordParms)) <br />
{ <br />
mciSendCommand(wDeviceID, MCI_CLOSE, 0, NULL); <br />
return (dwReturn); <br />
} <br />
<br />
<br />
if (MessageBox(hMainWnd, "Do you want to save this recording?", <br />
"", MB_YESNO) == IDNO) <br />
{ <br />
mciSendCommand(wDeviceID, MCI_CLOSE, 0, NULL); <br />
return (0L); <br />
} <br />
<br />
mciSaveParms.lpfilename = "c:\\file.wav"; <br />
if (dwReturn = mciSendCommand(wDeviceID, MCI_SAVE, <br />
MCI_SAVE_FILE | MCI_WAIT, (DWORD)(LPVOID) &mciSaveParms)) <br />
{ <br />
mciSendCommand(wDeviceID, MCI_CLOSE, 0, NULL); <br />
return (dwReturn); <br />
} <br />
return (0L); <br />
}
But my problem,it takes more time to record and not allowing to play the video.
(recording is done at first)
Can I do recording the audio and playing video simultaneously..
help me please..
cheers
sangeet
|
|
|
|
|
If the save is a lenghty operation, then you can simply start a new thread in which you will do the saving.
Cédric Moonen
Software developer
Charting control
|
|
|
|
|
Greetings:
I am writing an MFC app with VS 2003. I am trying to track a memory leak. I have replaced all of my "new" keywords with "DEBUG_NEW" as per the Microsoft documentation on tracking MFC memory leaks.
All of my files contain the:
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
lines at the top and I am building in _DEBUG mode.
The compiler is issuing "identifier not found" for all instances of "DEBUG_NEW".
Does anybody know what the problem is?
Thanks in advance,
Mark
|
|
|
|
|
wrote: I am writing an MFC app with VS 2003. I am trying to track a memory leak. I have replaced all of my "new" keywords with "DEBUG_NEW" as per the Microsoft documentation on tracking MFC memory leaks.
All of my files contain the:
#ifdef _DEBUG
#define new DEBUG_NEW
#endif
lines at the top and I am building in _DEBUG mode.
The compiler is issuing "identifier not found" for all instances of "DEBUG_NEW".
Does anybody know what the problem is?
Are you using precompiled headers??
if not then try including "Afx.h" file which contains the definition related to DEBUG_NEW macro.
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
Hi, thanks for your response.
Yes, I am using pre-compiled headers and I also added the include of "afx.h" to the top of all of my files, just for good measure. I am still getting the same result...
Bizarre...
|
|
|
|
|