Discussion:
ISDN - CONNECT_IND - calling number = <Bad Ptr> !!
(too old to reply)
a***@gmail.com
2012-11-13 20:48:37 UTC
Permalink
with Windows 7 and VC++ I have written a CID for ISDN
using the follow approach ...

hLibDLL=LoadLibrary("CAPI2032.DLL");
waiting a phone call in a thread.

All are perfect having the relative message except the most important info I want ... the phone numbers!

When the Ring comes fires the CONNECT_IND message ... but inside the structure the char pointers (Calling_number, Called_number, etc) are <Bad Ptr> !!!

this is my code ....

if(CAPI_WAIT_FOR_SIGNAL(IsdnApplId)==0)
{
void *msg = NULL;
if(CAPI_GET_MESSAGE( IsdnApplId, &msg )==0)
{
CONNECT_IND *ind = (CONNECT_IND *)msg;

if((ind->Command == CAPI_CONNECT) && (ind->SubCommand == CAPI_IND))
{
if(ind->Calling_number)
{
}


The "ind->Calling_number" char pointer is not null … and trying to extract data the program crashes !! … doing debag I see them as <Bad Ptr> !!

if any one could help ?
Thank you
Artemis
a***@gmail.com
2012-11-15 17:45:34 UTC
Permalink
THANK YOU MY SELF !
another one time you help me :o)
seems i was the only one here to respond to this help ...

anyway the answer is ...
there are not pointers in this structure just raw data in a buffer.
the pointers have to be filled programmaticaly if i want to use them.
Loading...