Click here to Skip to main content
15,894,017 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using handle between two process Pin
Nishad S9-Jan-08 23:52
Nishad S9-Jan-08 23:52 
GeneralRe: Using handle between two process Pin
ashtwin10-Jan-08 1:19
ashtwin10-Jan-08 1:19 
GeneralRe: Using handle between two process Pin
Nishad S10-Jan-08 1:43
Nishad S10-Jan-08 1:43 
GeneralRe: Using handle between two process Pin
CPallini10-Jan-08 2:16
mveCPallini10-Jan-08 2:16 
GeneralRe: Using handle between two process Pin
David Crow10-Jan-08 2:19
David Crow10-Jan-08 2:19 
GeneralRe: Using handle between two process Pin
ashtwin10-Jan-08 18:32
ashtwin10-Jan-08 18:32 
GeneralRe: Using handle between two process Pin
David Crow11-Jan-08 2:29
David Crow11-Jan-08 2:29 
GeneralAbout wavein API Pin
minihotto9-Jan-08 23:26
minihotto9-Jan-08 23:26 
Hello
I have a program using waveIn API.
This is part of my code.
Originally, my program has a deadlock while running waveInReset.
I google it and it is said putting the wavein function in the callback function is forbidden.
So I delete the code which I put waveinstop in the callback function.
It can run waveInReset and waveInunprepareheader successfully.
But it halt at waveInClose.
I can't find information about waveInClose halt.
Can anybody solve this problem?Thx,
Jane.
<br />
while(1){      if(isopen==1){<br />
        if(waveInOpen(&hWavin,WAVE_MAPPER, &wfx,(DWORD_PTR)WaveInProc ,0,  CALLBACK_FUNCTION) ==   <br />
        MMSYSERR_NOERROR)<br />
         {<br />
               <br />
                isopen=1;<br />
                 for(int i=0;i<4;i++)<br />
                { <br />
                   mmrr = waveInPrepareHeader(hWavin, headersend + i, sizeof(WAVEHDR));<br />
                   mmrr = waveInAddBuffer(hWavin, headersend + i, sizeof(WAVEHDR));<br />
               }<br />
                mmrr = waveInStart(hWavin);   <br />
             }<br />
        }<br />
        if(isclose==1)<br />
        {   <br />
            if(hWavin)<br />
            {                   <br />
            mmrr=waveInReset(hWavin);<br />
                         <br />
            for(int i=0;i<4;i++)<br />
            {<br />
<br />
                mmrr=waveInUnprepareHeader(hWavin,headersend+i, sizeof(WAVEHDR));<br />
            }                <br />
           for(int i=0;i<4;i++)<br />
            {<br />
                    mmrr=waveInReset(hWavin);<br />
               }  <br />
           mmrr=waveInClose(hWavin);<br />
           sclose=0;<br />
               <br />
            }<br />
        }<br />
}<br />
static void CALLBACK WaveInProc(HWAVEIN hw, UINT uMsg,DWORD_PTR dwInstance, DWORD_PTR dwParam1, DWORD dwParam2)<br />
{<br />
         WAVEHDR* curhdrin = (WAVEHDR*)dwParam1;<br />
        if(uMsg != WIM_DATA)<br />
             return;<br />
        if(isclose==1){<br />
<br />
            Sleep(1000);<br />
            return;<br />
        }<br />
            ///other code////<br />
        waveInAddBuffer(hw, curhdrin, sizeof(WAVEHDR));<br />
<br />
}

QuestionRe: About wavein API Pin
Mark Salsbery10-Jan-08 7:38
Mark Salsbery10-Jan-08 7:38 
GeneralRe: About wavein API [modified] Pin
minihotto10-Jan-08 17:49
minihotto10-Jan-08 17:49 
GeneralRe: About wavein API Pin
Mark Salsbery11-Jan-08 6:51
Mark Salsbery11-Jan-08 6:51 
GeneralRead a file which is located in another machine Pin
CodingLover9-Jan-08 23:13
CodingLover9-Jan-08 23:13 
GeneralRe: Read a file which is located in another machine Pin
toxcct9-Jan-08 23:19
toxcct9-Jan-08 23:19 
GeneralRe: Read a file which is located in another machine Pin
CodingLover9-Jan-08 23:35
CodingLover9-Jan-08 23:35 
GeneralRe: Read a file which is located in another machine Pin
Maxwell Chen9-Jan-08 23:26
Maxwell Chen9-Jan-08 23:26 
GeneralRe: Read a file which is located in another machine Pin
CodingLover9-Jan-08 23:54
CodingLover9-Jan-08 23:54 
GeneralRe: Read a file which is located in another machine Pin
David Crow10-Jan-08 2:26
David Crow10-Jan-08 2:26 
GeneralRe: Read a file which is located in another machine Pin
toxcct10-Jan-08 5:14
toxcct10-Jan-08 5:14 
GeneralRe: Read a file which is located in another machine Pin
David Crow10-Jan-08 5:30
David Crow10-Jan-08 5:30 
GeneralRe: Read a file which is located in another machine Pin
toxcct10-Jan-08 5:38
toxcct10-Jan-08 5:38 
GeneralRe: Read a file which is located in another machine Pin
CodingLover10-Jan-08 16:09
CodingLover10-Jan-08 16:09 
GeneralRe: Read a file which is located in another machine Pin
CodingLover10-Jan-08 15:57
CodingLover10-Jan-08 15:57 
Generalreg. editbox Pin
mail2h.jain9-Jan-08 23:10
mail2h.jain9-Jan-08 23:10 
GeneralRe: reg. editbox Pin
Maxwell Chen9-Jan-08 23:12
Maxwell Chen9-Jan-08 23:12 
GeneralRe: reg. editbox Pin
Hamid_RT9-Jan-08 23:25
Hamid_RT9-Jan-08 23:25 

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.