napi_get_instance_data
napi_status napi_get_instance_data(napi_env env,
void** data);
-
[in] env
:调用 Node-API 调用的环境。¥
[in] env
: The environment that the Node-API call is invoked under. -
[out] data
:先前通过调用napi_set_instance_data()
与当前运行的代理相关联的数据项。¥
[out] data
: The data item that was previously associated with the currently running Agent by a call tonapi_set_instance_data()
.
如果 API 成功,则返回 napi_ok
。
¥Returns napi_ok
if the API succeeded.
此 API 检索以前通过 napi_set_instance_data()
与当前运行的代理相关联的数据。如果没有设置数据,则调用成功,data
将设置为 NULL
。
¥This API retrieves data that was previously associated with the currently
running Agent via napi_set_instance_data()
. If no data is set, the call will
succeed and data
will be set to NULL
.