def METHOD_NAME(self, class_name, method_info):
    parameters = ''
    if class_name:
        parameters = '    {}_Wrapper* wrapper'.format(class_name)
    is_result = False
    rtn_type = method_info['rtnType']
    if rtn_type.find('void ') == -1 or rtn_type.find('void *') != -1:
        rtn_types1 = self.clean_type_define(rtn_type)
        if class_name:
            parameters += ',\n'
        parameters += '    ' + rtn_types1 + ' return_value'
        if rtn_types1 == 'HRESULT':
            is_result = True
    space_index = 0
    for p in method_info['parameters']:
        if parameters:
            parameters += ',\n'
        parameters += '    '
        parameters += self.clean_type_define(p['type'])
        parameters += ' '
        parameters += p['name']
        if 'array_size' in p:
            array_length = p['array_size']
            parameters += ' '
            if 'multi_dimensional_array' in p:
                p['multi_dimensional_array']
                if 'multi_dimensional_array_size' in p:
                    multi_dimensional_array_size = p[
                        'multi_dimensional_array_size']
                    array_sizes = multi_dimensional_array_size.split("x")
                    for size in array_sizes:
                        parameters += '['
                        parameters += size
                        parameters += ']'
            else:
                parameters += '['
                parameters += array_length
                parameters += ']'
        while True:
            space_index = parameters.find(' ', space_index) + 1
            if space_index != 0 and (
                parameters[space_index] == '*'
                or parameters[space_index - 2] == '('
                or parameters[space_index] == '('
                or parameters[space_index] == ')'
            ):
                parameters = parameters[:space_index
                                        - 1] + parameters[space_index:]
            elif space_index == 0:
                break
    _class_name = ''
    if class_name:
        _class_name = '_' + class_name
    code = 'void Encode{}_{}(\n'\
        '{})'.format(_class_name, method_info['name'], parameters)
    code += self.get_encode_function_body(
        class_name, method_info, is_result
    )
    write(code, file=self.outFile)
    self.newline()