Article View: borland.public.cppbuilder.nativeapi
Article #11531Re: TAPI
From: Remy Lebeau (TeamB)
Date: Mon, 02 Feb 2004 22:04
Date: Mon, 02 Feb 2004 22:04
25 lines
1724 bytes
1724 bytes
"Babak" <babak_info@hotpop.com> wrote in message
news:401ebcd9@newsgroups.borland.com...
> what is wrong with this code?
You are declaring an unintialized pointer and then trying to access its
members before allocating any actual memory for them. You should do this
instead:
LINECALLPARAMS geCallParams = {0};
geCallParams.dwBearerMode = LINEBEARERMODE_VOICE;
geCallParams.dwMediaMode = LINEMEDIAMODE_INTERACTIVEVOICE;
geCallParams.dwAddressMode = LINEADDRESSMODE_DIALABLEADDR;
geCallParams.dwCallParamFlags = LINECALLPARAMFLAGS_DESTOFFHOOK |
LINECALLPARAMFLAGS_ORIGOFFHOOK;
geCallParams.dwNoAnswerTimeout = 30;
Then, when you are ready to pass the structure to a function that expects a
pointer, use the '&' address operator, ie:
somefunction(&geCallParams);
Gambit
Technical Details
Message-ID:
<401ec7d4$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<401ebcd9@newsgroups.borland.com>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 10cc67,1d1c29f49c8bfcc9 X-Google-Attributes: gid10cc67,public X-Google-ArrivalTime: 2004-02-02 14:10:03 PST From: "Remy Lebeau \(TeamB\)" <gambit47.no.spam@no.spam.yahoo.com> Newsgroups: borland.public.cppbuilder.nativeapi References: <401ebcd9@newsgroups.borland.com> Subject: Re: TAPI Date: Mon, 2 Feb 2004 14:04:51 -0800 Lines: 27 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 NNTP-Posting-Host: 67.22.138.253 Message-ID: <401ec7d4$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1075759060 67.22.138.253 (2 Feb 2004 13:57:40 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news2.google.com!news.maxwell.syr.edu!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail