ANY-maze Help > The ANY-maze reference > ANY-maze plug-ins > Plug-in API reference > AME_ENABLE message

AME_ENABLE message

The AME_ENABLE message is sent to a plug-in when the user enables or disables the plug-in in Protocol > Analysis and Results > Analysis Options > ANY-maze plug-ins. In most cases, you will not need to do anything and can simply return AME_NOTIMPLEMENTED. However, there may be circumstances where you wish to processes this message - for example, if your plug-in is communicating with another program, you might need to tell the other program that the plug-in has been disabled within ANY-maze.

Parameters

guid

Pointer to the GUID of the plug-in which has been enabled/disabled.

If a DLL only implements a single plug-in, it can ignore this parameter - although it is good practice to always check it.

wParam

Enabled flag. TRUE if the plug-in has been enabled, FALSE if the plug-in has been disabled.

lParam

Not used; always 0.

Return value

The only valid return codes from this message are:

 AME_OK 
 AME_ERROR 
 AME_NOTIMPLEMENTED 

If the message is processed successfully, then return AME_OK.

If an error occurs, return AME_ERROR.

If your plug-in does not process this message, you can return AME_NOTIMPLEMENTED.

Remarks

This message is also sent to a plug-in when an ANY-maze experiment is opened, to tell it whether it is enabled or disabled in the experiment's protocol. It is also sent to a plug-in when an experiment is closed - in this case the enabled flag will always be FALSE.

There is no obligation for a plug-in to 'track' its enabled state; for example a plug-in could consider itself to be enabled all the time, as ANY-maze won't send messages such as AME_TESTSTART, AME_POSN or AME_TESTEND to a disabled plug-in.

© Copyright 2003-2026 Stoelting Co. All rights reserved

ANY-maze help topic T1009