DirectShow 程序调试时遇到的几个问题,无法打开包括文件: dxtrans.h 这个问题

DirectShow 程序调试时遇到的几个问题

       在我在vs2008中使用 qedit.h 时候 出现了 无法打开包括文件: dxtrans.h 这个问题, 该问题是 使用 新的windows sdk 中带的 DirectShow 包时,包中不会再带有 dxtrans.h

     解决方法方法1
    Remove anything to do with "dxtrans.h" and "IDXEffect" .
    Say, for file "qedit.h"
    //#include "dxtrans.h" -- Line 498
    // IDxtCompositor //: public IDXEffect -- Line 837
    // IDxtAlphaSetter //: public IDXEffect -- Line 1151
    // IDxtJpeg //: public IDXEffect -- Line 1345
    // IDxtKey //: public IDXEffect -- Line 1735
    Now, everything compiles and works fine.
方法2
    在qedit.h中注释掉#include "dxstrans.h"
    在每个include<qedit.h>前加入以下的#define代码:
    #define
    __IDxtCompositor_INTERFACE_DEFINED__
    #define
    __IDxtAlphaSetter_INTERFACE_DEFINED__
    #define
    __IDxtJpeg_INTERFACE_DEFINED__
    #define
    __IDxtKey_INTERFACE_DEFINED__
    #include<qedit.h>

还有 由于机子上 装了 vs2005 又装了 windows sdk 6.1 开发包 的话 出现了 Can't include afxsock.h if WINVER 0x400

解决该问题的方法

You have it already working I guess :-), looking at the date of this topic.

But for the others searching for the solution.

By default only Windows XP still compiles...

You have to help it a little to compile for windows 2000.

Just open c:\program files\microsoft sdks\windows\v6.1\include\ws2def.h in VisualStudio.

Press Control + 'G' to bring up the 'Go to line' dialog, and type 312, to jump to line 312

Modify :

#if

(_WIN32_WINNT >= 0x0600)

typedef SOCKADDR_STORAGE_LH SOCKADDR_STORAGE;

typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;

#elif

(_WIN32_WINNT >= 0x0501)

typedef SOCKADDR_STORAGE_XP SOCKADDR_STORAGE;

typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;

#endif

Into:

#if

(_WIN32_WINNT >= 0x0600)

typedef SOCKADDR_STORAGE_LH SOCKADDR_STORAGE;

typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;

#elif

(_WIN32_WINNT >= 0x0500) // Windows 2000 also please

typedef SOCKADDR_STORAGE_XP SOCKADDR_STORAGE;

typedef SOCKADDR_STORAGE *PSOCKADDR_STORAGE, FAR *LPSOCKADDR_STORAGE;

#endif

And line 406 from:

#if

(_WIN32_WINNT >= 0x0501)IPPROTO_IPV6 = 41, // IPv6 header

IPPROTO_ROUTING = 43, // IPv6 Routing header

IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header

IPPROTO_ESP = 50, // encapsulating security payload

IPPROTO_AH = 51, // authentication header

IPPROTO_ICMPV6 = 58, // ICMPv6

IPPROTO_NONE = 59, // IPv6 no next header

IPPROTO_DSTOPTS = 60, // IPv6 Destination options

#endif

//(_WIN32_WINNT >= 0x0501)

to:

#if

(_WIN32_WINNT >= 0x0500) // Windows 2000IPPROTO_IPV6 = 41, // IPv6 header

IPPROTO_ROUTING = 43, // IPv6 Routing header

IPPROTO_FRAGMENT = 44, // IPv6 fragmentation header

IPPROTO_ESP = 50, // encapsulating security payload

IPPROTO_AH = 51, // authentication header

IPPROTO_ICMPV6 = 58, // ICMPv6

IPPROTO_NONE = 59, // IPv6 no next header

IPPROTO_DSTOPTS = 60, // IPv6 Destination options

#endif

//(_WIN32_WINNT >= 0x0500)

It seems to work OK :-)

引用地址 http://social.microsoft.com/Forums/zh-CN/vcgeneral/thread/4ef2b9f5-f0a3-4dce-b9c8-001e49f5c3ca

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值