Page 1 of 1
IDE - API Question
Posted: Sun Feb 12, 2012 6:13 pm
by johngb
Is there any way to stop a compile proceeding through the API after the Compile button has been pressed?
i.e. in the NotifyPreCompile Event could I do anything to abort the Compile?
Posted: Mon Feb 13, 2012 8:53 am
by David Barker
The original plugin sample pack has an example of this call, but in summary:
Code: Select all
// 1.0.1.1
procedure plgAbortCompile(pShowResults:BOOL);stdcall; external DLL_NAME name 'AbortCompile';
procedure plgAbortProgram;stdcall; external DLL_NAME name 'AbortProgram';
and
Code: Select all
case Message.wParam of
NOTIFY_PRE_COMPILE:
begin
plgAbortCompile(false);
Caption := 'COMPILE ABORT!!';
end;
NOTIFY_PRE_PROGRAM:
begin
plgAbortProgram;
Caption := 'COMPILE ABORT!!';
end;
Posted: Mon Feb 13, 2012 9:15 am
by johngb
Thanks Dave, I hadn't spotted that, I was just looking through the help file which doesn't mention it. Should have looked at cplugininterface.pas.