As no any function(method) in interface which's implemented by COM object which's not virtual. All interface methods that implemented by COM component always pure virtaul, thus always go inside vtable. So we can easily traverse vtable and can get exact addresses of all of those. Now rest is calling those functions. It includes knowing about full signature and every thing it takes as parameter. This is the one which is still missing ..an idea.?
I have used UrlDownloadToFile for quite some time in firefox and it was working flawlessly. But in the past couple of months or so I am facing this issue in firefox.
I download zip files from web servers inside an ActiveX that runs in a browser. When I log in to a website and try to download the zip file through my ActiveX in firefox, it fails. This worked previously. I have the necessary cookies created on my machine but somehow firefox does not seem to use them anymore. This still works prefectly in IE which downloads the file without any issue.
If the web server does not require a login, the file downloads without any issue.
This function gets stuck during "Sending Request" phase as indicated by the status code in the Progress callback.
I suspect the issue is with some security update in windows XP which has updated urlmon.dll and wininet.dll. I think IE handles the new update but firefox has stopped working because of that. I may be wrong though. If anyone has faced a similar issue, please help me out.
There are two interfaces IA and IB, but they reference each other in their method.
The problem is, if i declared IA before IB, IA would get a error because IB was unknown to it; if i declared IB before IA, IB would get the same error.
I know i can fix this problem by replacing the parameters from IAs and IBs to IUnkown. but i want to know if there is a resolution like C++'s classes pre-defining?
Thanks for your reply. I have tried this method but fail, because i always use the right idl files generated by atl project wizards, and i failed because i spelt 'Interface IB' other than 'interface IB'.(VS also highlights 'Interface' and 'interface'!).
Can I get any sample of how to write a COM component which should be accessible from JScript.
Actually , I am able to write a normal COM (InProc) component and able to invoke from other c++ client. But while trying the same from JScript , unable to invoke it.
I am getting error like automation server cannot create object etc.
As mentioned by cariolihome only interface inherited from IDispatch can be access by scripting clients. Additionally, only the default interface marked in the IDL using the [default] attribute inside coclass can be accessed by scripting clients.
«_Superman_» I love work. It gives me something to do between weekends.
HRESULT hr = ::CLSIDFromProgID(L"EmbeddedLink.Document", &classId);
if (hr == S_OK)
// Get the OLE client site from the container
hr = pIRichEditOle->GetClientSite(&pIOleClientSite);
if (hr != S_OK)
// Get storage from the container
hr = m_pIRichEditOleCallback->GetNewStorage(&pIStorage);
if (hr != S_OK)
// Create an OLE object i.e. the embedded item
hr = ::OleCreate(
if (hr != S_OK)
CDataObject *pDataObject = new CDataObject;
hr = pIOleObject->InitFromData(pDataObject, 0, 0);
if (hr != S_OK)
When I stream out the RTF, it looks great, with embedded objects as expected. When I stream the RTF into a new object of the CReportEditCtrl class, the objects are displayed in the new control, but when I look at process explorer, the mini-server is not running. When I stream out the RTF, each embeddeded object has gone, and has been replaced by its metafile, allowing it to be drawn, but all knowledge of the object has gone. What it going on? It looks as if the CRichEditCtrl instance has not loaded the embedded obejcts when the RTF data was streamed in. I thought the CRichEditCtrl was supposed to handle loading RTF containing embedded objects?
Incidentally, I get the same result with only one CReportEditCtrl instance if I stream out the RTF, stream it back in, and then stream it out again. The embedded objects are lost.
I modified the code so that immediately after streaming data from the RTF file into the rich edit control, it streamed it out from the rich edit control into a second file. The output RTF file is not the same as the original. The embedded Windows Media File object is present in the output file. The other embedded objects are not present, and instead there is a metafile in place of each.
Anyone any idea why some objects streamed out into the RTF file are present only as metafiles?
Okay, I have solved the problem in this post, if not the main problem. The example code contains an RTF with 4 embedded objects including one GIF. Of the non GIF objects, only one corresponds to an OLE server that is registered on my PC. So it seems that if the rich edit control is fed objects for OLE servers which are not registered, it discard all but the metafile so they can be drawn, but nothing more.
Never mind. I found a far simpler solution was to represent a link as protected text, ensuring the user could not edit it, but could see the link as simple text. Unfortunately using OLE objects would have meant one application running per link, which is inefficient and, well not good.
I develope an addon based on MotleyFool; example. User must do login to that, for using its functionality. In IE 8 when adding new tab or opening new IE window, new login is need. This occures beacause new instance of this addon creates.
How I can share any instance between multiple tab or multiple IE win?
You can use Mutex to check the instance of your addon. After the first time authentication save the status to authenticated in an INI file or in Registry. Check the mutex in each tab for get the status(Any instance is there) of your addon. If your addon is running then check the Authentication status. if authenticated from one of the tabs then login directly without user inputs.
I hope it will help you to over come the existing problem
Values that come - commented out. What am I doing wrong? Why not this work? How can I solve this problem?
In handler DISPID_NEWWINDOW3 event comes value URL of the new windows, but don't comes other values needed for navigate2, therefore, this solution does not suit me.
Sorry for my english.
Last Visit: 31-Dec-99 19:00 Last Update: 5-Feb-23 20:22