Ets_State_Pointer_Register()
注意: 需要 OPNET Development Kit
摘要
将状态指针与给定名称关联。
语法
Ets_State_Pointer_Register (state_id_str, state_ptr)
| 参数 | 类型 | 说明 |
|---|---|---|
state_id_str |
const char * |
名称字符串。 |
state_ptr |
void * |
状态指针。 |
返回类型
EtsT_Compcode
若 state_id 字符串有效则返回 EtsC_Compcode_Success,否则返回 EtsC_Compcode_Failure。
头文件
ets_api_state.h
详情
本函数将名称与状态指针关联,以便之后使用 Ets_State_Pointer_Get() 取回。在卸载 DLL 时,它可用于保留对内存块的引用。