错误MIDL4000:结构字段不能是指针类型 [英] error MIDL4000: A structure field cannot be a type of pointer

查看:57
本文介绍了错误MIDL4000:结构字段不能是指针类型的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Hello All,

Hello All,

我正在定义IDL,其中一个结构的字段是一个数组,我总是得到如下编译错误:

I am defining the IDL where one of the fields of a structure is an array, and I always got the compile error like below:

错误MIDL4000:结构字段不能是指针类型。 :myString [Struct'count_string'的字段'myString'  ]

以下是IDL中的代码:

Here is the code in the IDL:

    [ version (1.0)]

  ;  
typedef
struct counts_string

    {

         unsigned
short 尺寸;

        unsigned
short 长度;

        [ size_is (尺寸),
length_is (长度)]
字符 myString [*];

    } count_string;

来自MSDN:  https://msdn.microsoft.com/en-us/library/windows/desktop/aa367081( v = vs.85).aspx ,任何人
可以帮助解释这里的问题吗?

which is from MSDN: https://msdn.microsoft.com/en-us/library/windows/desktop/aa367081(v=vs.85).aspx, could anybody help to explain what's the problem here?

谢谢你这么多!!

Weian

推荐答案

你什么时候遇到这个错误的?你是如何使用这个结构的?
When did you encounter this error? How did you use this struct?


这篇关于错误MIDL4000:结构字段不能是指针类型的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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