Visual Studio 2005 做DirectShow DMO的问题,附代码

YHW 2005-11-05 03:30:22
我学着做个DMO,建了个dll的atl工程,然后添加了个atl simple Object,vs2005生成一堆代码,然后我改继承自 IMediaObjectImpl<CDMObject,1,1>

然后把必须实现的函数都申明出来,所有实现都用return 0;代替,然后编译,如下:

试了很多次都这样,哪位大王能帮忙看看?

------ Build started: Project: myDMO, Configuration: Debug Win32 ------
Linking...
Creating library Debug\myDMO.lib and object Debug\myDMO.exp
Microsoft (R) 32b/64b MIDL Compiler Version 6.00.0366
Copyright (c) Microsoft Corporation 1991-2002. All rights reserved.
Processing .\_myDMO.idl
_myDMO.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\prsht.idl
prsht.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\wtypes.idl
wtypes.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\basetsd.h
basetsd.h
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\guiddef.h
guiddef.h
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\mshtml.idl
mshtml.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\ocidl.idl
ocidl.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\oleidl.idl
oleidl.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\objidl.idl
objidl.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\unknwn.idl
unknwn.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\oaidl.idl
oaidl.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\servprov.idl
servprov.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\urlmon.idl
urlmon.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\msxml.idl
msxml.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\dimm.idl
dimm.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\mshtmhst.idl
mshtmhst.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\docobj.idl
docobj.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\exdisp.idl
exdisp.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\objsafe.idl
objsafe.idl
Processing d:\microsoft platform sdk\include\mediaobj.idl
mediaobj.idl
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\oaidl.acf
oaidl.acf
Processing D:\Microsoft Visual Studio 8\VC\PlatformSDK\include\ocidl.acf
ocidl.acf
DMObject.obj : error LNK2019: unresolved external symbol _MoFreeMediaType@4 referenced in function "protected: virtual __thiscall IMediaObjectImpl<class CDMObject,1,1>::~IMediaObjectImpl<class CDMObject,1,1>(void)" (??1?$IMediaObjectImpl@VCDMObject@@$00$00@@MAE@XZ)
DMObject.obj : error LNK2019: unresolved external symbol _MoCopyMediaType@8 referenced in function "protected: virtual long __stdcall IMediaObjectImpl<class CDMObject,1,1>::GetInputCurrentType(unsigned long,struct _DMOMediaType *)" (?GetInputCurrentType@?$IMediaObjectImpl@VCDMObject@@$00$00@@MAGJKPAU_DMOMediaType@@@Z)
Debug\myDMO.dll : fatal error LNK1120: 2 unresolved externals
Build log was saved at "file://c:\Documents and Settings\Administrator\Desktop\DMO_Test\myDMO\Debug\BuildLog.htm"
myDMO - 3 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


代码在
http://www.989888.com/download.php?id=2044
...全文
136 4 打赏 收藏 转发到动态 举报
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
蒋晟 2005-11-12
  • 打赏
  • 举报
回复
PSDK不包含DirectX SDK
参考http://www.microsoft.com/downloads/info.aspx?na=47&p=5&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=A55B6B43-E24F-4EA3-A93E-40C0EC4F68E5&u=details.aspx%3ffamilyid%3d1C8DC451-2DBE-4ECC-8C57-C52EEA50C20A%26displaylang%3den
YHW 2005-11-07
  • 打赏
  • 举报
回复
我是下的最新的psdk啊。
cx0928 2005-11-07
  • 打赏
  • 举报
回复
库版本用的可能不对
YHW 2005-11-05
  • 打赏
  • 举报
回复
不好意思,代码到http://www.kmabc.com/satan/dmo_test.rar下载
上面那个url需要注册

16,472

社区成员

发帖
与我相关
我的任务
社区描述
VC/MFC相关问题讨论
社区管理员
  • 基础类社区
  • Web++
  • encoderlee
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

        VC/MFC社区版块或许是CSDN最“古老”的版块了,记忆之中,与CSDN的年龄几乎差不多。随着时间的推移,MFC技术渐渐的偏离了开发主流,若干年之后的今天,当我们面对着微软的这个经典之笔,内心充满着敬意,那些曾经的记忆,可以说代表着二十年前曾经的辉煌……
        向经典致敬,或许是老一代程序员内心里面难以释怀的感受。互联网大行其道的今天,我们期待着MFC技术能够恢复其曾经的辉煌,或许这个期待会永远成为一种“梦想”,或许一切皆有可能……
        我们希望这个版块可以很好的适配Web时代,期待更好的互联网技术能够使得MFC技术框架得以重现活力,……

试试用AI创作助手写篇文章吧