视觉c++虚拟相机应用程序无法在 64 位 Windows 上运行
我正在尝试在 Visual C++ 中为 64 位 Windows 实现虚拟相机应用程序。我从这里的代码开始:tmhare.mvps.org/downloads/vcam.zip,它使用 DirectShow 过滤器模拟视频捕获设备。它在 32 位 Windows 上工作正常,但在 64 位 Windows 上不起作用。我修改了 Visual C++ 项目如下:
1) changed the platform to x64 and recompiled the dll, linking in the 64-bit version of strmbase.lib 2) changed preprocessor definitions to WIN64,_WIN64 from WIN32,_WIN32; 3) Recompiled the library and registered the dll using C:\Windows\system32\regsvr32.exe
dll 注册成功,并且 regedit 在 中显示了我的虚拟摄像头的三个键
HKEY_CLASSES_ROOT\CLSID\{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Instance\{8E14549A-DB61-4309-AFA1-3578E927E933}, HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Instance\{8E14549A-DB61-4309-AFA1-3578E927E933}, HKEY_CLASSES_ROOT\CLSID\{8E14549A-DB61-4309-AFA1-3578E927E933}\InprocServer32
但是,Skype 和 Windows Live Messenger 在 64 位 Windows 上都看不到摄像头。
我做错了什么?我知道 Win64 对于 64 位应用程序有 HKEY_LOCAL_MACHINE\Software\Classes\CLSID{guid} ,对于 32 位应用程序有 HKEY_LOCAL_MACHINE\Software\Wow6432Node ,但由于我将代码编译为 64 位应用程序,所以在我看来它的密钥被放置在注册表的正确部分。是否有适用于 64 位 Windows 的 DirectShow 虚拟相机滤镜实现可以用作示例(我只找到了一个适用于 32 位 Windows 的)?
I am trying to implement a virtual camera application in Visual C++ for 64 bit Windows. I started with the code here: tmhare.mvps.org/downloads/vcam.zip which emulates a video capture device using DirectShow filters. It works fine for me on 32 bit windows, but doesn't work on 64 bit windows. I modified the Visual C++ project as follows:
1) changed the platform to x64 and recompiled the dll, linking in the 64-bit version of strmbase.lib 2) changed preprocessor definitions to WIN64,_WIN64 from WIN32,_WIN32; 3) Recompiled the library and registered the dll using C:\Windows\system32\regsvr32.exe
The dll registers successfully and regedit shows three keys for my virtual camera in
HKEY_CLASSES_ROOT\CLSID\{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Instance\{8E14549A-DB61-4309-AFA1-3578E927E933}, HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{860BB310-5D01-11D0-BD3B-00A0C911CE86}\Instance\{8E14549A-DB61-4309-AFA1-3578E927E933}, HKEY_CLASSES_ROOT\CLSID\{8E14549A-DB61-4309-AFA1-3578E927E933}\InprocServer32
However, neither Skype nor Windows Live Messenger see the camera on 64-bit windows.
What am I doing wrong? I understand that Win64 has HKEY_LOCAL_MACHINE\Software\Classes\CLSID{guid} for 64-bit applications and HKEY_LOCAL_MACHINE\Software\Wow6432Node for 32-bit applications, but since I am compiling my code as a 64-bit application, it seems to me that its keys are being placed in the right part of the registry. Is there a DirectShow virtual camera filter implementation for 64-bit windows I could use as a sample (I only found one for 32-bit windows)?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我大约一年前尝试过 DirectShow,据我所知,64 位应用程序不支持它。所以我建议要么切换到 32 位模式,要么找到支持 64 位的库。这可能对你有帮助。
http://directshownet.sourceforge.net/
I tried out DirectShow a year or so back, and from what I can remember, there isn't support for it in 64-bit applications. So I'd recommend either switching to 32-bit mode, or finding a library which supports 64-bit. This may help you.
http://directshownet.sourceforge.net/
64 位过滤器的工作方式与 32 位过滤器完全相同,不涉及特殊性。适用一般规则,值得一提的是:过滤器 DLL 位数应与应用程序位数相匹配,例如,由于 Skype 始终是 32 位,无论操作系统位数如何,因此您需要 32 位虚拟摄像头。 Skype 并不关心 64 位过滤器,因为它从不使用它们。
另外,我不明白你上面的#2。您只需为另一个目标 (x64) 创建重复的现有配置,Visual Studio 将更新预定义的条件,例如 _WIN64,无需在代码中进行手动更改。
64-bit filters work exactly as their 32-bit peers, no specificity involved. A general rule applies, which is worth mentioning: filter DLL bitness should match the application bitness, e.g. as Skype is always 32-bit regardless of OS bitness, you need 32-bit virtual camera for it. Skype just does not care about 64-bit filters as it never uses them.
Also, I don't understand your #2 above. You only need to create duplicate existing configuration for another target (x64) and visual Studio will update predefined conditionals such _WIN64, no manual changes required in code.