{System.Runtime.InteropServices.COMException(0x80040154):检索具有CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3}的组件的COM类工厂由于以下错误而失败:80040154. [英] {System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3} failed due to the following error: 80040154.

查看:109
本文介绍了{System.Runtime.InteropServices.COMException(0x80040154):检索具有CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3}的组件的COM类工厂由于以下错误而失败:80040154.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到此错误
{System.Runtime.InteropServices.COMException(0x80040154):由于以下错误,检索具有CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3}的组件的COM类工厂失败:80040154.
在ASP.webform1_aspx.Page_Load(对象发件人,EventArgs e)中,位于c:\ Inetpub \ wwwroot \ WebcamPicture \ WebForm1.aspx:第21行} 在执行以下代码时


I am getting this error
{System.Runtime.InteropServices.COMException (0x80040154): Retrieving the COM class factory for component with CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3} failed due to the following error: 80040154.
at ASP.webform1_aspx.Page_Load(Object sender, EventArgs e) in c:\Inetpub\wwwroot\WebcamPicture\WebForm1.aspx:line 21}
while executing the following code


System.Data.SqlClient.SqlDataAdapter da = new System.Data.SqlClient.SqlDataAdapter();
        //Jpeg compression quality
        short nQuality = 45;
        //Shout a picture from my webcam
        
        CAMSERVERLib.Camera cam = new CAMSERVERLib.CameraClass();
        
        byte[] picture = (byte[])cam.GrabFrame(nQuality);
        //Add the hour to the jpeg picture
        MemoryStream ms = new MemoryStream(picture);
        Bitmap bmp = new Bitmap(ms);
        Graphics g = Graphics.FromImage(bmp);
        string strDate = DateTime.Now.ToLongDateString() + " - " + DateTime.Now.ToLongTimeString();
        StringFormat drawFormat = new StringFormat();
        drawFormat.Alignment = StringAlignment.Center;
        g.DrawString(strDate,
                        new Font(FontFamily.GenericSansSerif, 12),
                        new SolidBrush(Color.Black),
                        new RectangleF(1, 1, 320, 240),
                        drawFormat
                    );
        g.DrawString(strDate,
                        new Font(FontFamily.GenericSansSerif, 12),
                        new SolidBrush(Color.White),
                        new RectangleF(0, 0, 320, 240),
                        drawFormat
                    );
        //Get codecs
        ImageCodecInfo[] icf = ImageCodecInfo.GetImageEncoders();
        EncoderParameters encps = new EncoderParameters(1);
        EncoderParameter encp = new EncoderParameter(System.Drawing.Imaging.Encoder.Quality, (long)nQuality);
        //Set quality
        encps.Param[0] = encp;
        bmp.Save(Response.OutputStream, icf[1], encps);
        g.Dispose();
        bmp.Dispose();


我已经成功注册了dll iusing regasm.但是为什么我会收到此错误,请告诉我.

添加了代码块-OriginalGriff [/edit]


I have sucessfully register the dll iusing regasm. but why iam getting this error please tell me.

[edit]Code block added - OriginalGriff[/edit]

推荐答案

由于这是一个COM错误,使用再气注册dll将无效,您需要注册该dll使用regsvr32.

要找出什么dll,请在HKCR \ CLSID下的注册表中查找并查找GUID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3}

也请阅读 [
As this is a COM error registering a dll with regasm will have no effect you need to register the dll with regsvr32.

To find out what dll have a look in the registry under HKCR\CLSID and look for the GUID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3}

Also have a read of this[^] if you''re running IIS7


只要您收到数字出现错误,Google可以提供帮助:
http://www.google.co.uk/search ?sourceid = chrome& ie = UTF-8& q =错误:+80040154 [此处向您发送 [ ^ ]至少看起来很相关.
Whenever you receive an error with a number, google can help:
http://www.google.co.uk/search?sourceid=chrome&ie=UTF-8&q=error:+80040154[^] just use the error number as your search term.
In this case, it send you straight here[^] which at least looks relevant.


这篇关于{System.Runtime.InteropServices.COMException(0x80040154):检索具有CLSID {D6BA1539-8473-497C-92C3-8ECF63DAC0F3}的组件的COM类工厂由于以下错误而失败:80040154.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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