# h324Stop

Stops the H.324M Middleware for the specified MUX endpoint. Call this function at the end of a 3G-324M call.

#### Prototype

DWORD h324Stop ( MSPHD msphd)

Argument | Description
msphd | MSPP handle associated with the MUX endpoint.

#### Return values

Return value | Description
SUCCESS |
CTAERR_NOT_FOUND | msphd was not found. Neither h324Start nor h324Delete were called.
H324ERR_INTERNAL_ERROR | Internal error in the 3G-324M Middleware.
H324ERR_MUTEX_LOCK_FAILED | Internal error trying to lock mutex.
H324ERR_NOT_INITIALIZED | h324Initialize was not called first.

#### Events

Event | Description
H324EVN_STOP_DONE | H.324M Middleware was stopped, and provides a status code for success or failure. The application calls h324Delete when this event is received.

#### Example

ret = h324Stop(GwConfig[i].MuxEp.hd);
if (ret != SUCCESS)
{
printf("h324Stop returned 0x%x.\n", ret);
return ret;
}
else
{
ret = WaitForSpecificEvent ( i, GwConfig[i].hCtaQueueHd, H324EVN_STOP_DONE, &event);
if (ret != 0)
{
printf("H324EVN_STOP_DONE event failure, ret= %x, waitEvent.value=%x\n",
ret, event.value);
return ret;
}
}