Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

ISDN - CONNECT_IND - calling number = <Bad Ptr> !!

26 views
Skip to first unread message

artg...@gmail.com

unread,
Nov 13, 2012, 3:48:37 PM11/13/12
to
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

artg...@gmail.com

unread,
Nov 15, 2012, 12:45:34 PM11/15/12
to
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.



0 new messages