コード例 #1
0
static int CPROC ServiceFunction( uint32_t *params, uint32_t param_length /*FOLD00*/
										  , uint32_t *result, uint32_t *result_length )
{
	// echo the data we got back to the client...
// most other things will do useful functions in functions.
   //ThreadTo( ClientThread, params[-1] );
	MemCpy( result, params, param_length );
   *result_length = param_length;
   return TRUE;
}


#define NUM_FUNCTIONS (sizeof(functions)/sizeof( server_function))
SERVER_FUNCTION functions[] =
{
	ServerFunctionEntry( NULL )
, ServerFunctionEntry( NULL  )
, ServerFunctionEntry( NULL )
, ServerFunctionEntry( NULL )
, ServerFunctionEntry( ServiceFunction )
};



void OpenServer( void ) /*FOLD00*/
{
   l.MsgBaseServer = RegisterService( WIDE("Benchmark Service"), functions, NUM_FUNCTIONS );
}

void DumpStats( void ) /*FOLD00*/
{
コード例 #2
0
		  , uint32_t *result, uint32_t *result_length )
{
	xlprintf(LOG_ALWAYS)("Got a MateStarted.  Returning %d"
							  , INVALID_INDEX
							  );

  	result[0] = MSG_LASTMESSAGE;
  	result[1] = MSG_LASTEVENT;
  	(*result_length) = 8;
   return 7;
}

#define NUM_FUNCTIONS (sizeof(functions)/sizeof( server_function))
SERVER_FUNCTION functions[] =
{
	ServerFunctionEntry( ServerMateEnded )
, ServerFunctionEntry( ServerMateStarted  )
, ServerFunctionEntry( ServerGeneric )
, ServerFunctionEntry( ServerGeneric )
//, [MSG_EventUser]=ServerFunctionEntry( ServiceFunction)
, [MSG_RegisterIcon]= ServerFunctionEntry( ServerRegisterIcon )
, [MSG_UnregisterIcon]= ServerFunctionEntry( ServerUnregisterIcon )
//, [MSG_ChangeIcon]= ServerFunctionEntry( ServerChangeIcon )

};



void OpenServer( void )
{
	l.MsgBaseServer = RegisterService( WIDE("systray"), functions, NUM_FUNCTIONS );