Click here to Skip to main content
15,892,537 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Converting string to long Pin
Cedric Moonen17-Jan-07 21:01
Cedric Moonen17-Jan-07 21:01 
GeneralRe: Converting string to long Pin
Michael Dunn17-Jan-07 22:17
sitebuilderMichael Dunn17-Jan-07 22:17 
GeneralRe: Converting string to long Pin
vgandhi17-Jan-07 22:26
vgandhi17-Jan-07 22:26 
GeneralRe: Converting string to long Pin
Michael Dunn18-Jan-07 7:52
sitebuilderMichael Dunn18-Jan-07 7:52 
GeneralRe: Converting string to long Pin
David Crow18-Jan-07 3:23
David Crow18-Jan-07 3:23 
GeneralRe: Converting string to long Pin
vgandhi18-Jan-07 6:44
vgandhi18-Jan-07 6:44 
GeneralRe: Converting string to long Pin
David Crow18-Jan-07 7:08
David Crow18-Jan-07 7:08 
Questionon saving WAV file Pin
git crunk17-Jan-07 20:24
git crunk17-Jan-07 20:24 
why do i get an error with this source code? pls help me..im new to programming

///////////////////////////////////////////////////////////
// lpszPathName - Pathname of file
// pSound - Pointer to sound buffer
// cbSound - size in bytes of sound buffer
// pWfx - pointer to WAVEFORMATEX structure
// cbWfx - size of this structure

BOOL SaveWAVFile(LPCTSTR lpszPathName, HPSTR pSound, LONG cbSound,WAVEFORMATEX pWfx, LONG cbWfx)
{
MMIOINFO mmioinfo;
MMCKINFO ckRIFF;
MMCKINFO ck;
HMMIO hmmio;

::ZeroMemory(&mmioinfo,sizeof(mmioinfo));

hmmio = mmioOpen((LPSTR) lpszPathName,&mmioinfo,MMIO_WRITE|MMIO_CREATE);

if (hmmio == NULL)
{
TRACE("mmioOpen returns NULL\n");
return FALSE;
}

// Creating 'RIFF' and 'WAVE' chunks
ckRIFF.fccType = mmioFOURCC('W', 'A', 'V', 'E');
ckRIFF.cksize = 0L;
ckRIFF.dwFlags = MMIO_DIRTY;
mmioCreateChunk(hmmio, &ckRIFF, MMIO_CREATERIFF);

// Creating 'fmt ' chunk
ck.ckid = mmioFOURCC('f', 'm', 't', ' ');
ck.cksize = 0L;
ck.dwFlags = MMIO_DIRTY;
mmioCreateChunk(hmmio, &ck, 0);
mmioWrite(hmmio, (HPSTR) pWfx, cbWfx);

// Goto to 'WAVE' chunk and update 'fmt ' chunk size
mmioAscend(hmmio, &ck, 0);

// Creating 'data' chunk
ck.ckid = mmioFOURCC('d', 'a', 't', 'a');
ck.cksize = 0L;
ck.dwFlags = MMIO_DIRTY;
mmioCreateChunk(hmmio, &ck, 0);
mmioWrite(hmmio,(HPSTR) pSound,cbSound);

// Goto to 'WAVE' chunk and update 'data' chunk size
mmioAscend(hmmio, &ck, 0);

// Goto to 'RIFF' chunk and update 'WAVE' chunk size
mmioAscend(hmmio, &ckRIFF, 0);
mmioClose(hmmio,0);
}




AnswerRe: on saving WAV file Pin
Cedric Moonen17-Jan-07 20:33
Cedric Moonen17-Jan-07 20:33 
GeneralRe: on saving WAV file Pin
git crunk18-Jan-07 22:09
git crunk18-Jan-07 22:09 
GeneralRe: on saving WAV file Pin
Cedric Moonen19-Jan-07 0:58
Cedric Moonen19-Jan-07 0:58 
QuestionMy CreateFile is not working Pin
amitmistry_petlad 17-Jan-07 19:54
amitmistry_petlad 17-Jan-07 19:54 
AnswerRe: My CreateFile is not working Pin
prasad_som17-Jan-07 19:59
prasad_som17-Jan-07 19:59 
GeneralRe: My CreateFile is not working Pin
amitmistry_petlad 17-Jan-07 20:12
amitmistry_petlad 17-Jan-07 20:12 
AnswerRe: My CreateFile is not working Pin
prasad_som17-Jan-07 20:25
prasad_som17-Jan-07 20:25 
GeneralRe: My CreateFile is not working Pin
amitmistry_petlad 17-Jan-07 20:34
amitmistry_petlad 17-Jan-07 20:34 
AnswerRe: My CreateFile is not working Pin
prasad_som17-Jan-07 21:30
prasad_som17-Jan-07 21:30 
AnswerRe: My CreateFile is not working Pin
Hamid_RT17-Jan-07 20:03
Hamid_RT17-Jan-07 20:03 
GeneralRe: My CreateFile is not working Pin
amitmistry_petlad 17-Jan-07 20:15
amitmistry_petlad 17-Jan-07 20:15 
GeneralRe: My CreateFile is not working Pin
Rajesh R Subramanian17-Jan-07 20:37
professionalRajesh R Subramanian17-Jan-07 20:37 
GeneralRe: My CreateFile is not working Pin
Hamid_RT18-Jan-07 0:38
Hamid_RT18-Jan-07 0:38 
QuestionCString amd multithreading Pin
softwaremonkey17-Jan-07 19:39
softwaremonkey17-Jan-07 19:39 
AnswerRe: CString amd multithreading Pin
Nibu babu thomas17-Jan-07 20:14
Nibu babu thomas17-Jan-07 20:14 
GeneralRe: CString amd multithreading Pin
softwaremonkey17-Jan-07 20:53
softwaremonkey17-Jan-07 20:53 
AnswerRe: CString amd multithreading Pin
David Crow18-Jan-07 3:29
David Crow18-Jan-07 3:29 

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.