处理来自调用函数的错误
当返回 时,这意味着外部函数已被调用并成功返回。它并不意味着外部函数成功获得了结果;若要获取此信息,程序必须检查结果参数。如果外部函数成功并且旨在返回值,则结果将指向包含一个或多个值的结果缓冲区列表。如果外部函数失败,则 result 参数设置为 。如果外部函数未返回结果,则 result 参数也是如此。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-3-5 15:36
Powered by Discuz! X3.4
Copyright © 2001-2021, Tencent Cloud.