Click here to Skip to main content
15,899,632 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: leake of memory Pin
Galatei13-Oct-06 0:43
Galatei13-Oct-06 0:43 
GeneralRe: leake of memory Pin
zizzzz13-Oct-06 1:02
zizzzz13-Oct-06 1:02 
GeneralRe: leake of memory Pin
zizzzz13-Oct-06 1:21
zizzzz13-Oct-06 1:21 
GeneralRe: leake of memory Pin
Galatei13-Oct-06 1:38
Galatei13-Oct-06 1:38 
GeneralRe: leake of memory Pin
zizzzz14-Oct-06 7:37
zizzzz14-Oct-06 7:37 
Questionauto run problem Pin
ooola13-Oct-06 0:04
ooola13-Oct-06 0:04 
AnswerRe: auto run problem Pin
Galatei13-Oct-06 0:51
Galatei13-Oct-06 0:51 
QuestionA simple question about recording Pin
minihotto12-Oct-06 23:23
minihotto12-Oct-06 23:23 
I follow the following steps to write a simple record program
waveInOpen
waveInPrepareHeader
waveInAddBuffer
waveInStart
waveInGetPosition
waveInReset
waveInUnprepareHeader
waveInClose

The program runs with no errors.

But I create a file to record the voice.
HANDLE FileHandle = CreateFile( L"myTest.wav", GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
The wav file was created.
But I play rhe wav file by windows media player.
It says there is an error.

Is there any problem with my code?
My part code is below.
<br />
HANDLE FileHandle = CreateFile( L"myTest.wav", GENERIC_WRITE, FILE_SHARE_READ, NULL, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL); <br />
WriteFile(FileHandle, &dwNumber, 4, &NumToWrite, NULL); <br />
SetEndOfFile(FileHandle); <br />
CloseHandle( FileHandle );  <br />
FileHandle = INVALID_HANDLE_VALUE;<br />


Can somebody help me?
Thanks a lot.
minihotto
AnswerRe: A simple question about recording Pin
Cedric Moonen12-Oct-06 23:34
Cedric Moonen12-Oct-06 23:34 
GeneralRe: A simple question about recording Pin
minihotto13-Oct-06 6:10
minihotto13-Oct-06 6:10 
GeneralRe: A simple question about recording Pin
Cedric Moonen13-Oct-06 6:27
Cedric Moonen13-Oct-06 6:27 
AnswerRe: A simple question about recording Pin
Galatei13-Oct-06 1:02
Galatei13-Oct-06 1:02 
AnswerRe: A simple question about recording Pin
Hamid_RT13-Oct-06 1:04
Hamid_RT13-Oct-06 1:04 
AnswerRe: A simple question about recording Pin
Mark Salsbery13-Oct-06 6:59
Mark Salsbery13-Oct-06 6:59 
QuestionWorking with file??? Pin
sonyama12-Oct-06 23:06
sonyama12-Oct-06 23:06 
QuestionRe: Working with file??? Pin
prasad_som12-Oct-06 23:14
prasad_som12-Oct-06 23:14 
AnswerRe: Working with file??? Pin
sonyama12-Oct-06 23:18
sonyama12-Oct-06 23:18 
AnswerRe: Working with file??? Pin
prasad_som12-Oct-06 23:51
prasad_som12-Oct-06 23:51 
AnswerRe: Working with file??? Pin
Galatei13-Oct-06 2:29
Galatei13-Oct-06 2:29 
QuestionFolder Permission Pin
_tasleem12-Oct-06 21:57
_tasleem12-Oct-06 21:57 
AnswerRe: Folder Permission Pin
Mila02512-Oct-06 22:11
Mila02512-Oct-06 22:11 
QuestionChanging the Font of a Dialog Static Label Pin
Andy20212-Oct-06 21:52
Andy20212-Oct-06 21:52 
AnswerRe: Changing the Font of a Dialog Static Label Pin
prasad_som12-Oct-06 22:33
prasad_som12-Oct-06 22:33 
AnswerRe: Changing the Font of a Dialog Static Label Pin
Mila02512-Oct-06 22:43
Mila02512-Oct-06 22:43 
GeneralRe: Changing the Font of a Dialog Static Label Pin
prasad_som12-Oct-06 23:04
prasad_som12-Oct-06 23:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.