Retrieving the COM class factory for component with CLSID{} failed

P

prg.abdullah

Hi every one,

I'm developing an internet explorer toolbar plugin using vs2005 c#.
I'm using the bandObject for. every thing is ok i've successfully
deployed the plugin. on my toolbar there is a button from which i want
to take the functionality of auto filing the html form. I'm using the
microsoft.html for this purpose. I'm getting the following error/
exception on the following line:

Retrieving the COM class factory for component with CLSID{} failed due
to the following error: 80040154

the code is

HTMLDocument doc = new HTMLDocument();
doc = (HTMLDocument)this.Explorer.Document;

//HTMLInputElement ele = new HTMLInputElementClass();
HTMLInputElement ele = new HTMLInputElement();
foreach (HTMLInputElement element in
doc.getElementsByTagName("input"))
{
MessageBox.Show(element.toString());
ele = (HTMLInputElement)element.getAttribute("titles",
0);
ele.value = "prayag.narula";
}

Kind help me!!!!!!!!

regards

rahi
 
N

Nicholas Paldino [.NET/C# MVP]

Rahi,

Instead of creating the class, you will want to call the createElement
method on the IHTMLDocument2 interface which sould be revealed by the
document class (you can cast this.Explorer.Document to that interface, and
then make the call).
 
P

prg.abdullah

Nicholas,

First of all thanks for your kind reply! I couldn't understand that
kindly send me some code lines to do that actually I'm new to work
with COM!

regards
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top