|
I am learning COM. And has come to know about one of the Advantages of the COM over .dll file. That
It extends the functionality of (client)application without rebuilding.
I.e. If you make the changes in function of .Dll File which client application is using you need to recompile the application. But if you are using the COM you dont need to do recompilation of client application
But How ?? afterall the COM ( inprocess COM) is also a .dll
|
|
|
|
|
Well you don't necessarily have to rebuild the entire app that is using a dll when it changes. Think about how Microsoft provides patches or updates to DLLs. Do you need to rebuild your OS to use the new DLLS
As long at the function interface does not change you don't need to worry about rebuilding the app that uses the DLL.
COM provides interfaces that other app use. As long as the interface is not changed everything will be fine if the COM object has some code changes.
Let's say a code of a COM interface was modify like a bug fix, then the app using the old COM object will be able to use the new COM object because all it needs to do is CoCreate the COM object and Query for it's interface. This part remains the same in the app, so the app doesn't need to be changed.
|
|
|
|
|
I m thinking to learn COM but not getting from where to start ?. If u know about any good book please tell. If you can provide the link to the Ebook it will be gr8 HELP!.
Thnx in Advance.
|
|
|
|
|
|
Thnx but I have already read this article b4 and other aricles from the codeproject.com. So if u know about any good Book which have explained COM in Depth please tell me.
|
|
|
|
|
Essential COM by Don Box.
|
|
|
|
|
Essential COM - by Don Box
you may also want to look at
Inside COM - by Dale Rogerson
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Hi,
How will you talk with Activex or COM(could be created in MFC) From C#?
Plzz send me ur valuable suggestions to me as soon as possible...Thanks to u..What is CCW and RCW?How to use it?
spalanivel
|
|
|
|
|
|
Thanks for ur information.. and if any coding related to these it will be more useful...
|
|
|
|
|
|
|
I have a COM component with no .h files.
I want to use,but how should I begin?
Thanks.
GOOD LUCK!
|
|
|
|
|
IDispatch can help
or
use #import[^] on the Type library which could be a seperate file or embeded in the COM server DLL
Sohail
modified 21-Apr-21 21:01pm.
|
|
|
|
|
Thanks very much.But I am a beginer of COM,would you like to give me a demo of such task?
GOOD LUCK.
|
|
|
|
|
Some interfaces in Windows Media Player are only available by using a "remote" host. I'd like to remote the player control from my OCX which is embedded in IE. I am searching for way to get a reference to a container that would support IObjectWithSite (ideally IE itself) to set up my remote host object in order to create the remoted WMP instance... any assistance, ideas or comments would be greatly appreciated.
Addition: BTW all this works fine when done from an MFC app... but I can't get a container reference in the OCX.
-- modified at 12:10 Wednesday 12th September, 2007
|
|
|
|
|
Here's exactly what's going wrong -
CAxWindow *m_pView;
CComPtr<IAxWinHostWindow> spHost;
RECT rectWMP={1,1,1,1};
AtlAxWinInit();
m_pView = new CAxWindow();
hr = m_pView ? S_OK : E_OUTOFMEMORY;
if(SUCCEEDED(hr))
{
MessageBox(_T("Got AxWindow"), _T("WMP Container"), MB_OK);
m_pView->Create(m_hWnd, rectWMP, NULL, WS_CHILD);
hr = ::IsWindow(m_pView->m_hWnd)? S_OK : E_FAIL;
}
Is it clearer what is going on from that? (this same code works fine in a local app)
|
|
|
|
|
Hi All,
I am trying to retrive message from a computer that is running Microsoft Exchange Server
using OnSyncSave(IExStoreEventInfo pEventInfo, string bstrURLItem, int lFlags)
The bstrURLItem i am getting is of this format
file://./backofficestorage/London.ukproject.com/
Public Folders/Exch test msg-87539250.EML
The message subject given was Exch test msg
Why are these numbers appended to Message Subject ?
Ashish Vasudev
|
|
|
|
|
I would like to learn COM to use in WTL. But I can't find no tutorials that are up to date for C++. And actually goes through it all. And not just skip around expecting you to know everything.
|
|
|
|
|
|
Hi Experts,
How can I check for particular version of MS-Outlook from registry value.
Thanx in advance.
|
|
|
|
|
Hello All,
I have a problem.
My application is a MFC AppWizard(exe) project and Dialog base application with automation support.
This automation support feature provides a odl file and we have exposed some functions using this odl file.
Now we want to place this interface pointer in the ROT.
I have placed the interface pointer in the ROT, and able to retrieve the same in the same process.
Problem started when I retrieve the same interface pointer from ROT in a different process ( other than my process), it is not finding this interface at all in the ROT ( but the moniker is presented in the ROT).
I got to know that this is the problem of not having proxy/stub dll for my application.
Now my question is how to create a proxy/stub dll for this odl file.
Regards
Kishore
|
|
|
|
|
How to write directly in COleStreamFile(would be serialized in Structured Storage)?
Thanks.
|
|
|
|
|
Hi,
I have a small problem. Hope you guys help me solve it. Here goes...
I have a base class BASE and three classes derived from BASE, namely A, B and C. BASE contains properties and functions common to A, B and C. Now, I have to create multiple instances of A, B and C and store them together. So what do I do? I create an array of BASE pointers and a variable which signifies the type of derived class the BASE pointer holds so that whenever I need a derived class, I just get the pointer and type from the Array and upcast it to its concerned class. Is this a good design?
Now I have to implement the same using COM components. I have to expose BASE, A, B and C via COM interfaces and create the component such that when ever I get a BASE component, just by looking at the type, I can Query it for the appropriate Interface. Is the correct way of solving such a problem or is there a better way to do it?
Thanks..
---
Hakuna-Matata
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
I would say yes, store the COM-Objects with IUnknown- or your BASE-Interface and query for the disired Interface.
|
|
|
|