Quote Originally Posted by Delfi
// a procedure
CBackProc:= Sources[src].DeleteCB; <-deletecb is pointer to a procedure, filled from another function
just looking back over this code are you sure that Sources[src].DeleteCB is pointing to a valid callback function?

to avoid the AV you could use some defensive programming and try
[pascal]
if Assigned ( aCallBack ) then
begin
aCallBack( 0, nil ); // call it
end
else
begin
WriteLn( 'No Callback function defined' )
end
[/pascal]

Using "if aCallBack <> nil" will not work as the compiler treats that as an attempt to make a function/procedure call.