You may forget to MemPtrNew your modemP so that it can point to anything.
The Fatal Exception could happen sooner when you tried to initialize the
modemP structure. In your case, it happens later because MdmDial really
tried to access to or use some invalid member that you don't access or use
in your intialization.

Giang
--- Patrick Ouellet <[EMAIL PROTECTED]> wrote:
> First thanx to all those who helped me along the way....
> 
> 
> Ok, Im doing something really simple.
> I only want to dial in a computer via the palm modem.
> 
> So here is what I've done
> 
> But when I make the MdmDial call it just "Fatal Exception" in my face
> what do I do wrong....
> 
>  static Boolean CentCall(CharPtr NoTel)
>  {
>   UInt SerNum;
>   MdmInfoPtr modemP;
>   CharPtr okDialP;
>   CharPtr setupP;
>   Err ModemErr;
> 
>  modemP->serRefNum = SerNum;
>  modemP->initialBaud = 14400L;
>  modemP->dtWaitSec = -1;
>  modemP->dcdWaitSec = -1;
>  modemP->volume = 3;
>  modemP->hwHShake = true;
>  modemP->autoBaud = false;
> 
>  setupP = MemPtrNew(50);
> 
>  StrCopy(setupP, "");
> 
>  if(SysLibFind("Serial Library", &SerNum) == 0 )
>  {
>   if( SerOpen(SerNum, 0, 14400L) == 0 )
>   {
>    ModemErr = MdmDial(modemP, okDialP, setupP, NoTel);
>    switch(ModemErr)
>    {
>       //Many Case of error, but nothing done for now...
>    }
>   }
>   else
>   {
>    SerClose(SerNum);
>    return false;
>   }
>  }
>  else
>  {
>   SerClose(SerNum);
>   return false;
>  }
> 
>  SerClose(SerNum);
>   return true;
>  }
> 
> I know there is some error, like that I can go out of the function
> without closing the serial port, but that's not the problem
> so don't tell me about it...
> 
> Whats wrong with my MdmDial call ???
> 
> 
> -- 
> For information on using the Palm Developer Forums, or to unsubscribe,
> please see http://www.palmos.com/dev/tech/support/forums/


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/tech/support/forums/

Reply via email to