GetStatus() function has changed since 6.30 (no, it hasn't)

Hello,

Since Amibroker 6.30
PLUGINAPI int GetStatus( struct PluginStatus *status )
do not behave the same way as 6.20, is it possible that something has changed?
In 6.20 color of the status box show normally, but in 6.30 the status always in black color.

The plugin in the example from Quotrack below, thanks.

struct PluginStatus
{
	int			nStructSize;
	int			nStatusCode;
	COLORREF	clrStatusColor;
	char		szLongMessage[ 256 ];
	char		szShortMessage[ 32 ];
};
PLUGINAPI int GetStatus( struct PluginStatus *status )
{
	switch( g_nStatus )
	{
	case STATUS_WAIT:
		status->nStatusCode = 0x10000000;
		strcpy( status->szShortMessage, "WAIT" );
		strcpy( status->szLongMessage, "Waiting for connection" );
		status->clrStatusColor = RGB( 255, 255, 0 );
		break;
	case STATUS_CONNECTED:
		status->nStatusCode = 0x00000000;
		strcpy( status->szShortMessage, "OK" );
		strcpy( status->szLongMessage, "Connected OK" );
		status->clrStatusColor = RGB( 0, 255, 0 );
		break;
	case STATUS_DISCONNECTED:
		status->nStatusCode = 0x20000000;
		strcpy( status->szShortMessage, "ERR" );
		strcpy( status->szLongMessage, "Disconnected.\n\nPlease check if QuoteTracker is running.\nAmiBroker will try to reconnect in 15 seconds." );
		status->clrStatusColor = RGB( 255, 0, 0 );
		break;
	case STATUS_SHUTDOWN:
		status->nStatusCode = 0x30000000;
		strcpy( status->szShortMessage, "DOWN" );
		strcpy( status->szLongMessage, "Connection is shut down.\nWill not retry until you re-connect manually." );
		status->clrStatusColor = RGB( 192, 0, 192 );
		break;
	default:
		strcpy( status->szShortMessage, "Unkn" );
		strcpy( status->szLongMessage, "Unknown status" );
		status->clrStatusColor = RGB( 255, 255, 255 );
		break;
	}

	return 1;
}

A possible reason:

1 Like

Hello Chris25,
Color shows fine in version 6.20, 6.00, but same code cannot work on 6.30.
2020-07-17_13-50-36

below is version 6.00
2020-07-17_14-04-09
same code in plugin but not working in 6.30

the plugin is my own plugin.

Hey I figured it out, it have got something to do with 32 bit and 64bit size of the struct.
Thanks to you all!

No, plugin interface DID NOT change and everything works as it did in 6.20. If it changed, our OWN plugins would not work. But they do, without any changes made to them.

1 Like