SetConsoleCtrlHandler Question

Experts,

I am trying to capture the CTRL-C from a Delphi console application.  I have
been told to use the SetConsoleCtrlHandler and have gone to look up how to
use this.  However I have been unsuccessful in finding out how to use this
in Delphi.

If anyone can help it would be greatly appreciated.

This is how I have coded so far:

The Function:

function CtrlHandler(fdwCtrlType: integer):boolean;
begin
case fdwctrltype of
    CTRL_C_EVENT:
    begin
        // do some stuff here
    end;
end;
end;

In my console application main body I have put this:

begin
// set console handler for ctrl-c
SetConsoleCtrlHandler(CtrlHandler,True);
end;

I get an error stating "Not enough paramaters" for CtrlHandler - but what
actually do you put there?

Thanks,
Robert