Windows Media Encoder SDK,将无法使用.为什么?简单的vb.net程序帮助. [英] Windows Media Encoder SDK, Won't work. Why? simple vb.net program help..

查看:70
本文介绍了Windows Media Encoder SDK,将无法使用.为什么?简单的vb.net程序帮助.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Vista 64位(我认为这是家庭高级版,但我不是100%)

我正在使用新的Visual Studio 2008

我添加了Windows Media编码器sdk添加到我的系统中

我将Windows Media编码器引用添加到我的程序中,我编写了此代码,只是为了测试使用此SDK进行BEGIN编码的能力.

(我创建了一个带列表框对象的表单对象)

导入WMEncoderLib
导入WMPREVIEWLib

导入System.IO
公共类Form1

私有子Form1_Load(ByVal发送者作为System.Object,ByVal e作为System.EventArgs)处理MyBase.Load
ListBox1.Items.Add(``____'')
昏暗编码器作为WMEncoder
Box 1. Items.Add("____")
编码器=新的WMEncoder
ListBox1.Items.Add("____")
End End
End Class


我的列表框上显示____,____(对不起,但很烂,但这很糟糕),然后停止...提示我的Encoder = New WMEncoder中正在发生某些事情...

我也立即进入运行程序时出现窗口

WindowsApplication1.exe中第一次出现类型'System.Runtime.InteropServices.COMException'的偶然异常.我不知道这是什么意思.

请注意,我已经下调了Vista的修复程序,并成功安装了该程序.

有可能我在设置或参考中缺少某些内容,或者在Windows构建中丢失了某些内容我需要,我真的很想开始使用此SDK,但是我什至无法初始化一个新的WMencoder ...注意,我确实安装了WME程序.

(可能不相关)第二点,如果您熟悉示例中的WME,则有一个命令行vbscript,当我运行该命令时,我会收到一条错误消息,指出变量未定义:"WshShell"我不确切知道此错误是什么,但我知道我已经下载了somethign来摆脱第二台XP计算机上的确切错误,但我不记得自己做了什么……最后一句话可能是没关系.


我很沮丧,因为我没有对任何东西进行错误编码,并且它根本无法正常工作,而且我也不知道我需要做什么才能使其正常工作.

Please help me


哦,这是另一件事,我的目标是什么.最终目标是简单地单击vb应用程序中的一个按钮,然后此按钮将开始使用计算机记录某人从安装了监视器的网络摄像头,并且当某个事件告诉网络摄像头停止录制时,请将其保存到未压缩的AVI文件中(我知道30秒-1分钟的视频时间是0.5至1演出).如果您知道直接从网络摄像头录制视频的更好方法,并且知道可以在vb.net上使用,请告诉我...


非常感谢,我有点这些东西的新手,我不在寻找任何讲义或任何东西,我只是真的对为什么好的代码无法正常工作感到困惑...

再次感谢..

Brian

I am using Vista 64bit (i think it is home premium, but I'm not 100%)

I am using the new visual studio 2008

I added the windows media encoder sdk to my system

I added the windows media encoder references to my program


I wrote this code, just to test my ability to BEGIN coding with this SDK.

(I created a form object with a listbox object)

Imports WMEncoderLib
Imports WMPREVIEWLib

Imports System.IO
Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        ListBox1.Items.Add("____")
        Dim Encoder As WMEncoder
        ListBox1.Items.Add("____")
        Encoder = New WMEncoder
        ListBox1.Items.Add("____")
    End Sub
End Class


My list box says ____, ____ (sorry for the vulgarity, but this sucks), and stops... Suggesting that there is something going on in my Encoder = New WMEncoder...

I also get in my immediate window when running the program

A first chance exception of type 'System.Runtime.InteropServices.COMException' occurred in WindowsApplication1.exe


I don't know what this means. 

Notes, I have downoladed the hotfix for vista, and it installed successfully...

There is a possibility I am missing something in the setup or references, or something in my windows build that I need, I would really love to start working with this SDK, but I can't even get the thing to initialize a new WMencoder... Note I do have the program WME installed.

(possibly unrelated) Second note, if you are familiar with WME in the samples there is a command line vbscript, when I run that I get an error saying    Variable is undefined: "WshShell"  I don't know exactly what this error is but I know that I've downloaded somethign before to get rid of this exact error on my second xp computer, but I can't remember what I did...This last statment may be of no consequence.  


I'm pretty frustrated because I haven't miscoded anything, and it just won't work, and I have no Idea what I need to do to make it work..

Please help me


Oh, here's another thing, What is my goal.. The end goal is to simple click a button in a vb app, this button will then start recording someone using the computer from a monitor mounted webcam, and when a event tells the webcam to stop recording save this to an uncompressed AVI file (30 seconds - 1 minute of vide .5 to 1 gig I know).   If you know a better way to record directly from a webcam to video, and you know this works with vb.net, please let me know...


Thanks oh so much, I'm kindof new to this stuff, I'm not looking for any handouts or anything, I'm just really confussed as to why good code won't work...

Thanks again..

Brian

推荐答案

我没有说这个,但是我正在使用Visual Studio 2008中的Visual Basic ...
I didn't say this but I am using Visual Basic from the visual studio 2008...


这篇关于Windows Media Encoder SDK,将无法使用.为什么?简单的vb.net程序帮助.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆