wkq清秋枫叶
驱动小牛
驱动小牛
  • 注册日期2004-06-17
  • 最后登录2008-08-07
  • 粉丝1
  • 关注0
  • 积分53分
  • 威望8点
  • 贡献值0点
  • 好评度4点
  • 原创分0分
  • 专家分0分
阅读:2501回复:3

一个define的用法,看不懂,请指教

楼主#
更多 发布于:2005-08-09 11:22
  看下面例句
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
};
wkq清秋枫叶
驱动小牛
驱动小牛
  • 注册日期2004-06-17
  • 最后登录2008-08-07
  • 粉丝1
  • 关注0
  • 积分53分
  • 威望8点
  • 贡献值0点
  • 好评度4点
  • 原创分0分
  • 专家分0分
沙发#
发布于:2005-08-09 14:21
就是一个宏定义
中午问了一个哥们,他告诉我是一个宏定义,
他说在DDK文档中(不是帮助文档)肯定能找到。后来,我在ks.h中找到,其定义如下:
#define DEFINE_KSFILTER_DESCRIPTOR(descriptor)\
    const KSFILTER_DESCRIPTOR descriptor =

类似地定义还有很多。这样,原文的意思很明了。
sd20178
驱动牛犊
驱动牛犊
  • 注册日期2007-01-07
  • 最后登录2007-03-28
  • 粉丝0
  • 关注0
  • 积分170分
  • 威望18点
  • 贡献值1点
  • 好评度17点
  • 原创分0分
  • 专家分0分
板凳#
发布于:2007-01-07 18:18
呵呵
JIANGLINGFENG
驱动牛犊
驱动牛犊
  • 注册日期2007-01-24
  • 最后登录2008-10-27
  • 粉丝0
  • 关注0
  • 积分0分
  • 威望11点
  • 贡献值0点
  • 好评度10点
  • 原创分0分
  • 专家分0分
地板#
发布于:2007-01-29 14:53
3Q

提醒了我
游客

返回顶部