如何宣布成功 [英] How to declare success

查看:73
本文介绍了如何宣布成功的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Visual Studio 11 beta。我有以下结构的C代码:

I am using Visual Studio 11 beta. I have C code with the following structure:

__success(*rcode == 0)
void xyz(__out int *rcode, 
         __in int func,
         __out int *something)
{
    if (func == 1) {
        *something = 10;
        *rcode = 0;
    } else {
        *rcode = -1;  /* Error */
    }
}

我设置了一个返回码(* rcode),表示呼叫未成功。在这种情况下,不会设置* something参数。

I set a return code (*rcode) that indicates the call did not succeed. In this case the *something parameter will not be set.

我遇到的问题是我得到错误C6001使用未初始化的内存'* rcode'。该错误指向xyz的声明。我不能改变代码来使用函数代码(所以我可以使用__success(return == 0))。

The problem I have is that I get error C6001 Using uninitialized memory '*rcode'. The error points to the declaration of xyz. I cannot change the code to use a function code instead (so I could use __success(return == 0)).

有人可以建议如何做到这一点吗?

Can anyone suggest how this should be done?

问候

Bengt

推荐答案

Hi Bengt,

Hi Bengt,

感谢您在MSDN论坛上发帖。

Thank you for posting in the MSDN forum.

由于我们很难重新编写整个项目,如果可能,可以
您分享我们的项目吗?请附上您的Visual Studio项目,您可以将其上传到天空驱动程序,然后在您的帖子中共享下载链接。
  我们会尝试使用我们的计算机进行检查,以便我们尽快解决此问题。

Since it is hard for us to repro this whole project, if possible, could you share us the project? Please attach your Visual Studio project, you can upload it to the sky driver, and then share the download link in your post.  We will try to check it with our computer, so we can resolve this issue together as soon as possible.

最诚挚的问候,


这篇关于如何宣布成功的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆