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

(5) 2024-07-03 20:12

Hi,大家好,我是编程小6,很荣幸遇见你,我把这些年在开发过程中遇到的问题或想法写出来,今天说一说
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"

今天的分享到此就结束了,感谢您的阅读,如果确实帮到您,您可以动动手指转发给其他人。

上一篇

已是最后文章

下一篇

已是最新文章

发表回复