Beispiel #1
0
/*	XOPEntry()

	This is the entry point from the host application to the XOP when the message specified by the
	host is other than INIT.
*/
extern "C" void
XOPEntry(void)
{	
	XOPIORecResult result = 0;
	
	switch (GetXOPMessage()) {
		case MENUITEM:								// XOPs menu item selected.
			XOPMenuItem();
			break;

		case MENUENABLE:							// Enable/disable XOPs menu item.
			XOPMenuEnable();
			break;
			
		case EXECUTE_OPERATION:
			{
				void* params;
				params = (void*)GetXOPItem(1);
				result = ExecuteMenuXOP1((MenuXOP1RuntimeParams*)params);
			}
			break;
	}
	
	SetXOPResult(result);
}
Beispiel #2
0
/*	XOPEntry()

	This is the entry point from the host application to the XOP for all messages after the
	INIT message.
*/
static void
XOPEntry(void)
{	
	long result = 0;

	switch (GetXOPMessage()) {
		case FUNCTION:						// Our external function being invoked ?
			result = DoFunction();
			break;

		case FUNCADDRS:
			result = RegisterFunction();
			break;

		case IDLE:
			srEnsureSrwInit();
			break;
	}
	SetXOPResult(result);
}