这是什么意思? [英] What does this mean?

查看:66
本文介绍了这是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

此定义来自propidl.h的Vista SDK:


#ifdef __cplusplus

#define REFPROPVARIANT const PROPVARIANT&

#else

#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST

#endif


再次在propkeydef.h中:


#ifdef __cplusplus

#define REFPROPERTYKEY const PROPERTYKEY&

#else //!__ cplusplus

#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST

#endif // __cplusplus

好​​的,所以我知道PROPVARIANT和PROPERTYKEY是什么,但我很害怕

我不明白什么是REFPROPVARIANT和REFPROPERTYKEY指的是

to。

究竟是什么定义的? REFPROPVARIANT和

REFPROPERTYKEY如何分别与原始PROPVARIANT和PROPERTYKEY相关,

。我之前没有见过相同的语法。


谢谢!

Brett

解决方案

2007年12月31日星期一13:18:38 -0800,brettcclark写道:


这个定义来自propidl.h的Vista SDK:


#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST


好​​的,所以我知道PROPVARIANT和PROPERTYKEY是什么,但我很害怕

我不明白REFPROPVARIANT和REFPROPERTYKEY所指的是什么。

究竟是什么定义的?



正在定义REFPROPVARIANT。每当预处理器在#define之后看到

REFPROPVARIANT之后,它就用const PROPVARIANT

* __MIDL_CONST替换它。那就是#define所做的一切。对于

REFPROPERTYKEY,它的工作方式相同。这是一个简单的单词替换,没有关于上下文。


我不知道const PROPVARIANT * __MIDL_CONST是什么意思,

但是你说你已经知道了,所以一旦你理解了#define是如何工作的,你应该能够弄清楚

休息。


12月31日,4:下午29点,Harald van D?| k< true ... @ gmail.comwrote:


星期一,2007年12月31日13:18:38 -0800, brettcclark写道:


这个定义来自propidl.h的Vista SDK:


#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST


好​​的,所以我知道PROPVARIANT和PROPERTYKEY是什么,但我很害怕

我不明白REFPROPVARIANT和REFPROPERTYKEY所指的是什么。

究竟是什么定义的?



正在定义REFPROPVARIANT。每当预处理器在#define之后看到

REFPROPVARIANT之后,它就用const PROPVARIANT

* __MIDL_CONST替换它。那就是#define所做的一切。对于

REFPROPERTYKEY,它的工作方式相同。这是一个简单的单词替换,没有关于上下文。



对,那么这意味着什么呢?


const PROPVARIANT * __MIDL_CONST

< blockquote class =post_quotes>
我不知道const PROPVARIANT * __MIDL_CONST是什么意思,

但是你说你已经知道了,所以你应该能够找出<一旦你理解#define是如何工作的,你就可以休息。



啊,我明白PROPVARIANT的结构是什么,但是,就像你一样,我



没有想法这个小星号是什么......这就是问题所在。我理解

什么定义,但奇怪的const PROPVARIANT * __MIDLE_CONST

扔给我

一个循环。


谢谢!


2007年12月31日星期一13:34:07 -0800,brettcclark写道:


对,那么这意味着什么呢?


const PROPVARIANT * __MIDL_CONST


>我不知道const PROPVARIANT * __MIDL_CONST应该是什么意思,但是你说你已经知道了,所以一旦你理解了,你应该能够弄明白其余的#define有效。



啊,我明白PROPVARIANT的结构是什么,但是,像你一样,我



没有想法这个小星号是什么......这就是问题所在。



const PROPVARIANT *仅表示指向只读PROPVARIANT的指针。

无论你是学习C还是C ++,你的教科书或教程应该涵盖

指针。它的__MIDL_CONST几乎可以是任何东西,可能是

a编译器特定的指令,可能是另一个宏,可能是某些东西

完全不同。


This define is from the Vista SDK from propidl.h:

#ifdef __cplusplus
#define REFPROPVARIANT const PROPVARIANT &
#else
#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST
#endif

and again in propkeydef.h:

#ifdef __cplusplus
#define REFPROPERTYKEY const PROPERTYKEY &
#else // !__cplusplus
#define REFPROPERTYKEY const PROPERTYKEY * __MIDL_CONST
#endif // __cplusplus
OK, so I know what PROPVARIANT and PROPERTYKEY are, but I''m afraid
that I don''t understand what REFPROPVARIANT and REFPROPERTYKEY refers
to.
What exactly is being defined? How does REFPROPVARIANT and
REFPROPERTYKEY relate to the original PROPVARIANT and PROPERTYKEY,
respectively. I''ve not seen this same syntax before.

Thanks!
Brett

解决方案

On Mon, 31 Dec 2007 13:18:38 -0800, brettcclark wrote:

This define is from the Vista SDK from propidl.h:

#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST

OK, so I know what PROPVARIANT and PROPERTYKEY are, but I''m afraid that
I don''t understand what REFPROPVARIANT and REFPROPERTYKEY refers to.
What exactly is being defined?

REFPROPVARIANT is being defined. Whenever the preprocessor sees
REFPROPVARIANT after that #define, it replaces it with const PROPVARIANT
* __MIDL_CONST. That''s all that #define does. It works the same way for
REFPROPERTYKEY. It''s a simple word replacement, without regarding context.

I have no idea what const PROPVARIANT * __MIDL_CONST is supposed to mean,
but you say you already know, so you should be able to figure out the
rest once you understand how #define works.


On Dec 31, 4:29 pm, Harald van D?|k <true...@gmail.comwrote:

On Mon, 31 Dec 2007 13:18:38 -0800, brettcclark wrote:

This define is from the Vista SDK from propidl.h:

#define REFPROPVARIANT const PROPVARIANT * __MIDL_CONST

OK, so I know what PROPVARIANT and PROPERTYKEY are, but I''m afraid that
I don''t understand what REFPROPVARIANT and REFPROPERTYKEY refers to.
What exactly is being defined?


REFPROPVARIANT is being defined. Whenever the preprocessor sees
REFPROPVARIANT after that #define, it replaces it with const PROPVARIANT
* __MIDL_CONST. That''s all that #define does. It works the same way for
REFPROPERTYKEY. It''s a simple word replacement, without regarding context.

Right, so what does this mean then?

const PROPVARIANT * __MIDL_CONST

I have no idea what const PROPVARIANT * __MIDL_CONST is supposed to mean,
but you say you already know, so you should be able to figure out the
rest once you understand how #define works.

Ahh, I understand what the structure PROPVARIANT is, but, like you, I
have
no idea what the little asterisk is for... that was the question. I
understand
what define does, but the weird const PROPVARIANT * __MIDLE_CONST
threw me
for a loop.

Thank you!


On Mon, 31 Dec 2007 13:34:07 -0800, brettcclark wrote:

Right, so what does this mean then?

const PROPVARIANT * __MIDL_CONST

>I have no idea what const PROPVARIANT * __MIDL_CONST is supposed to
mean, but you say you already know, so you should be able to figure out
the rest once you understand how #define works.


Ahh, I understand what the structure PROPVARIANT is, but, like you, I
have
no idea what the little asterisk is for... that was the question.

const PROPVARIANT * simply means "pointer to read-only PROPVARIANT".
Whether you''re learning C or C++, your textbook or tutorial should cover
pointers. It''s __MIDL_CONST that could be pretty much anything, possibly
a compiler-specific directive, possibly another macro, possibly something
completely different.


这篇关于这是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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