How to compile ffdshow-tryout with VS2008+SP1 + Vista Platform SDK(ver6.1) + Microsoft DirectX SDK (August 2008)

Note:

 

在使用最新的DirectX SDK (August 2009)的前提下,已经不需要下面的补丁了,也就是说最新的ffdshow-tryout可以不用做任何修改就可以用vs2008直接编译!

Cheers!

 

Update 2009/12/27

 

 

Index: src/TkeyboardDirect.h

===================================================================
--- src/TkeyboardDirect.h (版本 2529)
+++ src/TkeyboardDirect.h (工作副本)
@@ -4,15 +4,16 @@
 #include "Toptions.h"
 #include "interfaces.h"
 
-struct IDirectInput;
-struct IDirectInputDevice;
+struct IDirectInput8;
+struct IDirectInputDevice8;
+
 class TdirectInput :public Toptions
 {
 private:
  const char_t *name;
  const GUID &deviceId;const DIDATAFORMAT &deviceFormat;
- IDirectInput *di;
- IDirectInputDevice *did;
+ IDirectInput8 *di;
+ IDirectInputDevice8 *did;
  char_t classname[40];
  HWND h;
  HANDLE event;
Index: src/TkeyboardDirect.cpp
===================================================================
--- src/TkeyboardDirect.cpp (版本 2529)
+++ src/TkeyboardDirect.cpp (工作副本)
@@ -73,8 +73,8 @@
 void TdirectInput::hook(void)
 {
  if (di) unhook();
- DPRINTF(_l("hook"));
- DirectInputCreate(0,DIRECTINPUT_VERSION,&di,NULL);
+ DPRINTF(_l("hook")); 
+ DirectInput8Create(0,DIRECTINPUT_VERSION,IID_IDirectInput8,(void**)&di,NULL);
  if (!di) return;
  di->CreateDevice(deviceId,&did,NULL);if (!did) return;
 
Index: src/stdafx.h
===================================================================
--- src/stdafx.h (版本 2529)
+++ src/stdafx.h (工作副本)
@@ -56,7 +56,7 @@
 #include <streams.h>
 // DirectX/VFW/ACM
 #include <mmreg.h>
-#define DIRECTINPUT_VERSION 0x0300
+#define DIRECTINPUT_VERSION 0x0800
 #include <dinput.h>
 #include <dvdmedia.h>
 #include <mpconfig.h>
Index: ffdshow_2008.vcproj
===================================================================
--- ffdshow_2008.vcproj (版本 2529)
+++ ffdshow_2008.vcproj (工作副本)
@@ -96,7 +96,7 @@
  Name="VCLinkerTool"
  RegisterOutput="false"
  IgnoreImportLibrary="true"
- AdditionalDependencies="libcmtd.lib winmm.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib dinput.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
+ AdditionalDependencies="libcmtd.lib winmm.lib comctl32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib dinput8.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
  OutputFile="bin/ffdshow.ax"
  SuppressStartupBanner="true"
  AdditionalLibraryDirectories=""
@@ -325,7 +325,7 @@
  Name="VCLinkerTool"
  RegisterOutput="false"
  IgnoreImportLibrary="true"
- AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libcmt.lib winmm.lib comctl32.lib dinput.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
+ AdditionalDependencies="kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib libcmt.lib winmm.lib comctl32.lib dinput8.lib dxguid.lib oldnames.lib shlwapi.lib $(NOINHERIT)"
  OutputFile="bin/ffdshow.ax"
  LinkIncremental="1"
  SuppressStartupBanner="true"
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值