prg_file_typed_file_prepare_write()

摘要

根据基础类型文件在当前模型目录集合中的位置,为包含其完整路径名的字符串分配内存。

语法

prg_file_typed_file_prepare_write (filename, file_type, dest_name)
参数 类型 说明
filename const char* 类型文件的文件名。
file_type “PrgT_Tfile_Type“ tfile 类型(表 5 “Tfile Package Symbolic Constants“ 第 152 页中的值之一)
dest_name char ** 指向存放文件的目标位置的指针。

返回类型

PrgT_Compcode

返回 PrgC_Compcode_Success;否则返回 PrgC_Compcode_Failure。

头文件

prg_file_funcs.h

详情

此函数根据基础文件(filename)的 file_type 类型在当前模型目录集合中的位置,为包含其完整路径名的字符串分配内存。如果文件尚不存在,路径将被设置为位于主模型目录(primary models directory)中。其他副作用包括:若该文件尚不存在,则创建一个空文件。字符串 dest_name 不再需要时必须用 prg_mem_free() 释放。

本站文档由 北京智网畅联科技有限公司 整理、翻译并提供 · Documentation compiled and provided by Beijing ZNetLink Technology Co., Ltd.

交流群 · QQ Group:OPNET/智网妙算网络仿真交流群(群号 486383494)

原文档 © 2017 Riverbed Technology · 本站为公益翻译,由 AI 辅助完成,请仔细甄别

Original documentation © 2017 Riverbed Technology. Community translation, AI-assisted. Contact: jiazequn@znetlink.com