#include <tmsmapi.h> //initialize Api pCtx = TM_Init(); //Create Event placeholder. pStepClearEvent= MSM_CreateWEvent(pCtx,NULL); pStepClearEvent->eventType=STEPCLEAREVENT;//set event type pStepClearEvent->szTDPID=L”sampleTDPID”;//set TDPID pStepClearEvent->szResourceId=L”FLOAD”;//set resource id MSM_AddWResourceType(pCtx,pStepClearEvent,L”sampleResId”);//Add multi-argument ResourceType pStepClearEvent->iAlertCode=TMSM_SEVERITY_CRITICAL;//set alert code pStepClearEvent->szJobName=L"sampleJobName";//set job name pStepClearEvent->szJobStep=L"sampleJobStep";//set job step status=MSM_SendWEvent(pCtx,pStepClearEvent);//send event MSM_FreeAndClearWEventMembers(pCtx, pStepClearEvent); //Free event. Do not forget to call this MSM_FreeWEvent(pCtx, pStepClearEvent); //Free Context.do not forget to call this. TM_Free(pCtx);