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

  • Thread starter Thread starter prg.abdullah
  • Start date Start date
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
 
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).
 
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
 
Back
Top