在VC和C#中如何使用Windows Media Encoder COM组件接口编程

ms-help://MS.MSDNQTR.v90.chs/wmencode/htm/programmingincpp.htm

Programming in C++

This topic describes what you should know when programming in C++. Unless otherwise noted, the examples in this documentation are written in Microsoft Visual C++® 6.0.

When programming in C++, you must add the necessary header files to your project. The following header files are provided with the Windows Media Encoder SDK.

Header fileDescription
localagent.hIncludes interfaces that enable remote administration of Windows Media Encoder applications.
mspropshell.hIncludes interfaces that enable you to implement dialog boxes containing the predefined property pages.
wmdevctl.hIncludes interfaces for controlling digital devices.
wmdrmprf.hIncludes interfaces for protecting content with DRM.
wmencode.hIncludes interfaces that configure and run Windows Media Encoder applications.
wmencvu.hIncludes an interface that can be used to create and run a preview of a stream.
wmsencid.hIncludes a complete set of DISPID definitions.

Instead of including the wmencode.h and mspropshell.h header files, you can import the corresponding type libraries to generate wrapper classes that simplify implementation of the related COM interfaces:

#import "WMEnc.exe"
#import "MSPShell.dll"
 

ms-help://MS.MSDNQTR.v90.chs/wmencode/htm/programmingincsharp.htm

Programming in C#

This topic describes what you should know when programming in Microsoft C#.

Note   In each C# project you must add references to the Windows Media Encoder SDK type libraries.

To add Windows Media Encoder SDK references to a C# project

  1. On the Project menu, click Add Reference, and then click the COM tab.
  2. Select the references you need for your application, as described in the following table, and then click the Select button.
    ReferenceDescription
    Windows Media EncoderRequired for all Windows Media Encoder applications.
    Windows Media Encoder AgentRequired for applications that enable remote administration.
    Windows Media Encoder Agent LocatorRequired for applications that enable remote administration.
    Windows Media Encoder Device ControlRequired for applications that control an external digital device.
    Windows Media Encoder Preview ControlRequired for applications that display a window to preview input sources.
    Windows Media Encoder Time Compression Plug-inRequired for applications that use the time compression plug-in.

To use the MSPropShell ActiveX control

  1. On the View menu, click Toolbox.
  2. In the Toolbox, right-click in the Components section, and then click Customize Toolbox.
  3. On the COM Components tab, click MS PropShell Ctrl Class
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值