Mail Archives: djgpp/2003/07/13/14:20:57
> From: Nick <charles AT NO-SPAM DOT iie DOT cnam DOT fr>
> Newsgroups: comp.os.msdos.djgpp
> Date: Sun, 06 Jul 2003 13:48:48 +0200
>
> My code is
>
> void ( *Aspi )( unsigned char * ) = ( void * )0;
Where's the pointer to Aspi set to something non-zero? I don't see
anything in your code that does that. Did I miss something?
> callback_info.pm_offset = (long)Aspi;
This is only valid if Aspi is a real function, not a NULL pointer.
That is, you need to write a _real_ handler function called Aspi.
> And when I try to use Aspi(srb) I have a seg fault.
Please post the full text of the crash message, complete with
registers' dump and SYMIFY'ed call traceback. That info is very
important to find the reason(s) for the crash.
> I assume it's
> because either srb should be in Dos memory, but i've copied it in __tb
> and it crashed as well, or Aspi is not well defined, or there is
> something else I didn't catch.
I think it's because Aspi is a NULL pointer. You cannot call a NULL
pointer without crashing.
- Raw text -