阅读:2501回复:3
一个define的用法,看不懂,请指教
看下面例句
DEFINE_KSFILTER_DESCRIPTOR(InitialFilterDescriptor) {................}; 如果它是函数,但在.h文件中它没有函数原型声明,如果它是宏, 又找不到宏定义,即使在DDK中也找不到。 请高手指教。 全部代码如下: DEFINE_KSFILTER_DESCRIPTOR(InitialFilterDescriptor) { &FilterDispatch, // Dispatch &FilterAutomation, // AutomationTable KSFILTER_DESCRIPTOR_VERSION, // Version 0, // Flags &KSNAME_BdaSWTunerFilter, // ReferenceGuid DEFINE_KSFILTER_PIN_DESCRIPTORS(InitialPinDescriptors), // PinDescriptorsCount; must expose at least // one pin // PinDescriptorSize; size of each item // PinDescriptors; table of pin descriptors DEFINE_KSFILTER_CATEGORY(KSCATEGORY_BDA_NETWORK_TUNER), // CategoriesCount; number of categories in // the table // Categories; table of categories DEFINE_KSFILTER_NODE_DESCRIPTORS_NULL, // NodeDescriptorsCount; in this case, 0 // NodeDescriptorSize; in this case, 0 // NodeDescriptors; in this case, NULL DEFINE_KSFILTER_DEFAULT_CONNECTIONS, // Automatically fills in the connections table for a filter which defines no // explicit connections // ConnectionsCount; number of connections in // the table // Connections; table of connections NULL // ComponentId; in this case, no ID is provided }; |
|
沙发#
发布于:2005-08-09 14:21
就是一个宏定义
中午问了一个哥们,他告诉我是一个宏定义,他说在DDK文档中(不是帮助文档)肯定能找到。后来,我在ks.h中找到,其定义如下: #define DEFINE_KSFILTER_DESCRIPTOR(descriptor)\ const KSFILTER_DESCRIPTOR descriptor = 类似地定义还有很多。这样,原文的意思很明了。 |
|
板凳#
发布于:2007-01-07 18:18
呵呵
|
|
地板#
发布于:2007-01-29 14:53
3Q
提醒了我 |
|