在Windows应用程序中实现VLC播放器:编程方式注册一个ActiveX组件 [英] Implementing VLC player in a Windows application: Programatically registering an ActiveX component

查看:298
本文介绍了在Windows应用程序中实现VLC播放器:编程方式注册一个ActiveX组件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

即时通讯使用以下指南来实现我的windows应用程序中的VLC播放器:

Im using the following guide to implement a VLC player inside my windows application:

http://www.codeproject.com/Questions/163016/How-to-embed-VLC-控制在C-NET-Windows的APPLICAT

(见最受好评的答案)

在步骤2中的指南中,它说,我必须注册ActiveX组件:

On step 2 in the guide, it says that I have to register the ActiveX component:

regsvr32 "D:\Program Files\VideoLAN\VLC\axvlc.dll"

我如何做到这一点的编程该软件使得用户不必?
林就如何继续在这里不确定。谁能帮我?

How do I do this programatically in the software so that the user doesn't have to? Im unsure on how to proceed here. Can anyone help me?

推荐答案

请试试这个例程注册您的dll

Please try this routine to register your dlls

    public static void RegisterDll(string filePath)
    {
        string fileinfo = String.Format(@"/s ""{0}""", filePath);
        Process process = new Process();
        process.StartInfo.FileName = "regsvr32.exe";
        process.StartInfo.Arguments = fileinfo;
        process.StartInfo.UseShellExecute = false;
        process.StartInfo.CreateNoWindow = true;
        process.StartInfo.RedirectStandardOutput = true;
        process.Start();
        process.WaitForExit();
        process.Close();
    }

这篇关于在Windows应用程序中实现VLC播放器:编程方式注册一个ActiveX组件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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