a***@gmail.com
2012-11-13 20:48:37 UTC
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
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