当返回时,这意味着外部函数被调用并成功返回。这并不意味着外部函数成功获得了结果;若要获取此信息,程序必须检查结果参数。如果外部函数成功并且旨在返回值,则结果指向包含一个或多个值的结果缓冲区列表。如果外部函数失败,则结果参数设置为 。结果参数也是如果外部函数不返回结果。acedInvoke()RTNORMNULLNULL 以下示例代码片段检查预期返回一个或多个结果值的外部函数的返回值: struct resbuf *xfcnlist, *xresults;
// Build the invocation list, xfcnlist.
rc = acedInvoke(xfcnlist, &xresults);
if (rc != RTNORM) {
// Couldn't call the function—report this error (or even abort).
return BAD;
}
if (xresults == NULL) {
// Function was called but returned a bad result.
return BAD;
}
// Look at return results and process them.
|
|Archiver|CAD开发者社区
( 苏ICP备2022047690号-1 苏公网安备32011402011833)
GMT+8, 2025-10-29 17:08
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.