🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Roberto Mon, 24 Mar 2003 20:48
TAPI events
#17432
Author: Roberto
Date: Mon, 24 Mar 2003 20:48
54 lines
2098 bytes
            I  received the message LINE_APPNEWCALL  get the hCall in
dwParam2 and hLine in hDevice them I used lineGetID() to get the hCom , but
the SetCommMask() is return  "Invalid Identifier"

            I put the below code when I receve the message LINE_CALLSTATE ;
LINECALLSTATE_CONNECTED  or  LINECALLSTATE_OFFERING , but don't work

            What is missing ?

Thanx in advance
Roberto



// ------------------------------------------------------------

 pDeviceIDinfo=(VARSTRING*)LocalAlloc(LPTR,sizeof(VARSTRING)+100);

 ZeroMemory(pDeviceIDinfo, sizeof(VARSTRING)+100);

 pDeviceIDinfo->dwTotalSize=sizeof(VARSTRING)+100;



 struct FCOMM {VARSTRING var1; HANDLE hCom; CHAR pchar[1];} *Fcomm;



 if((erro=lineGetID(G_hLineIN,NULL,hCall ,LINECALLSELECT_CALL
,pDeviceIDinfo,"comm/datamodem"))<0)

  // handle error

 else{

   Fcomm=(FCOMM*)pDeviceIDinfo;

   hCom=Fcomm->hCom;

   var=Fcomm->pchar;

   G_Memo->Lines->Append("  lineGetID comm/datamodem= "+var);

 }



 if(SetCommMask(hCom,EV_RING | EV_CTS | EV_DSR  )==0){

   G_Memo->Lines->Append("  ERROR in  SetCommMask "+ERROR(GetLastError()));

 }

// ------------------------------------------------------------
Re: TAPI events
#17433
Author: Remy Lebeau (TeamB)
Date: Mon, 24 Mar 2003 21:18
10 lines
1296 bytes
SetCommMask() does not work with TAPI.  They are from completely different
APIs.  If you look at the documentation for SetCommMask(), it is expecting a
HANDLE that is returned from CreateFile(), which is not the case with TAPI.


Gambit

"Roberto" <casa@charao.com.br> wrote in message
news:3e7f6f0a@newsgroups.borland.com...
> the SetCommMask() is return  "Invalid Identifier"
Re: TAPI events
#17439
Author: Roberto
Date: Mon, 24 Mar 2003 22:17
35 lines
2262 bytes
    I had read that , but in TAPI  help "comm/datamodem"

If hComm is a valid handle, you can use it in subsequent calls to Win32 file
functions, such as ReadFile and WriteFile, to send and receive data on the
call. When you are finished using the communications port and preferably
before you use the lineDeallocateCall function to deallocate the call, you
must close the port by using the CloseHandle function.

    Then I believe that lineGetID() return a valid handle

    I had try to use CreateFile() to get the hCom , but I can't use
CreateFile with a used line , I have to first drop the line with
lineClose() , but it's will not work , I have to get the two hCom e hLine
to make the transfer
    Do you have other sugestion to get a valid hFile

Thanx in advance
Roberto

"Remy Lebeau (TeamB)" <gambit47@yahoo.com> escreveu na mensagem
news:3e7f73d9$5@newsgroups.borland.com...
> SetCommMask() does not work with TAPI.  They are from completely different
> APIs.  If you look at the documentation for SetCommMask(), it is expecting
a
> HANDLE that is returned from CreateFile(), which is not the case with
TAPI.
>
>
> Gambit
>
> "Roberto" <casa@charao.com.br> wrote in message
> news:3e7f6f0a@newsgroups.borland.com...
> > the SetCommMask() is return  "Invalid Identifier"
>
>
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads