ContentsIndex
Example
vm_gsm_sms_read_message
void custom_sms_read_message_callback(vm_gsm_sms_callback_t* callback_data)
{
    vm_gsm_sms_read_message_data_callback_t* read_message;
    if(callback_data->action == VM_GSM_SMS_ACTION_READ)
    {
        if(callback_data->cause == VM_GSM_SMS_CAUSE_NO_ERROR)
        {
            if(!callback_data->action_data)
            {
                 vm_log_debug("action_data is NULL.");
                 return;
            }
            read_message = (vm_gsm_sms_read_message_data_callback_t*)callback_data->action_data;
            vm_log_debug("message content is %s.",
                         vm_gb2312_string((VMWSTR)(read_message->message_data->content_buffer)));
            //maybe copy content_buff to other place
            vm_free(read_message->message_data->content_buffer);
            vm_free(read_message->message_data);
        }
        else
        {
            vm_log_debug("read message failed.");
        }
    }
}

void custom_sms_read_message(void)
{
    VMINT16 message_id;
    vm_gsm_sms_read_message_data_t * message_data = NULL;
    VMWCHAR * content_buff;
    VMINT res;

    message_id = vm_gsm_sms_get_message_id(VM_GSM_SMS_BOX_INBOX, 0);
    if(message_id == -1)
    {
        vm_log_debug("0 message-index does not exist.");
    }
    message_data = vm_calloc(sizeof(vm_gsm_sms_read_message_data_t));
    if(message_data == NULL)
    {
        vm_log_debug("message_data vm_calloc failed.");
    }
    content_buff = vm_calloc((500+1)*sizeof(VMWCHAR));
    if(content_buff == NULL)
    {
        vm_free(message_data);
        vm_log_debug("content_buff vm_calloc failed.");
    }
    message_data->content_buffer = content_buff;
    message_data->content_buffer_size = 500;
    res = vm_gsm_sms_read_message(message_id, VM_TRUE, message_data,
                                  custom_sms_read_message_callback, NULL);
    if(res != VM_GSM_SMS_RESULT_OK)
    {
        vm_log_debug("read message failed.");
    }
}
Created with a commercial version of Doc-O-Matic. In order to make this message disappear you need to register this software. If you have problems registering this software please contact us at support@toolsfactory.com.