|
mango_lier wrote:
I am curious to get some input from COM gurus why a call to QueryInterface() is adding an extra reference on the interface.
The COM rules says explicitly that a successful QueryInterface shall increase the reference count. This must be the case if you think about it. You are getting a reference to a new interface handle. It must be AddRef()'d because of situations like these:
IUnknown* pUnk = ...;
IMyInterface* pItf;
pUnk->QueryInterface(__uuidof(IMyInterface), (void**)&pItf);
pUnk->Release();
pItf->MyMethod(); If QueryInterface didn't AddRef(), then the code above would be invalid.
The COM rules assures that client code does not need to be complex.
Good music: In my rosary[^]
-- modified at 5:20 Sunday 25th September, 2005
|
|
|
|
|
Give me an Example of Custom marshelling in COM.
Bhargava Alanka
|
|
|
|
|
Hi every one !
Dear i m doing a project that i want to transfer text,audio,video data between two web application.if any one can help me in this regard i will be very thankfull to you.
Ok bye
waiting
irshad
hello join me and give me some useful information
allah hafiz
irshad
|
|
|
|
|
I need IPhelper API for one of my application ..... but MSVC installed on my system doesnt have this file or IpHelper.h .....
and quite rightly when i compile the program, it gives error
fatal error C1083: Cannot open include file: 'Iphlpapi.h': No such file or directory
I searched in my MSVC and didnt find it there..... so tell me how can i get it ...
Best regards
Mukhan
|
|
|
|
|
hi,
I am new to this , what does does this COM stands for
Can anyone send me some help regarding this
regds
Amit
|
|
|
|
|
In a nutshell ...
Component Object Model.
COM is a set of specifications and services designed to allow the following:
Modular code components can be written in any COM language and called from any other COM language. Example, a COM component created in C++ can be used by VB and in some case edven VBScript.
COM components can be changed within certain specs and swapped out without recompiling the application that uses them. So you can fix or upgrade functionality in a COM object ,and install the upgrade without having to change the application itself.
COM supports distributed applications - in other words an application can use a COM component but the actual location is transparent to the application. So an application that uses a COM component does not know and does not care if the component is in the same folder, in a different folder, or on a completely different machine in a network.
|
|
|
|
|
Hi rwestgraham,
thanks a million.
Can u plz mail me some links to this or some sort of literature abt this.
Waiting for a reply
regds
Amit
|
|
|
|
|
I really don't have any good links for beginning COM.
Everything I know about COM I learned from various books I bought, mainly:
"Beginning ATL 3 COM Programming" by Wrox Press
"Advanced VB6" by Matthew Curland
maybe a few other sources, and the forums like this and mostly just struggling with it a lot.
|
|
|
|
|
My first foray in COM and active scripting. When I run my app, I get the following message in the Debug windows
"INTERFACE LEAK: Ref Count = 1, MaxRefCount = 3, {Allocation =6} MyFunction - IDispatch"
It looks like the ATL debug trace is trying to tell me something but what is it and where should I start.
Thanks
|
|
|
|
|
Your calls of AddRef() and Release() on a COM-Interface are not balanced.
|
|
|
|
|
Thanks for the information, that is what I was suspecting, after going through some COM documentation. I guess the traces in the debug window are trying to tell me the count of AddRef and Release with ">" "<" count.
|
|
|
|
|
Hi all
I want to use IImnAccountManager Interface for outlook express accounts management.
It requires "imnact.h" header file, I searched into my system this file is not present there also I searched to net but didn't get any important information related to this file.
So please tell me that where can I hget this file from?
Please help me.
Thanks.
|
|
|
|
|
I had a component which has automation support and i am calling the component from the HTML page which contains VBSCRIPT. Every thing is working fine. but i am not able to debug the Component. i tried with inetinfo.exe and dllhost.exe.
Kindly help me what is the process i need to attach for debugging this component and generally how can i know what is the process i need to attach for debugging the DLL's
subbarao.
|
|
|
|
|
|
Thanks for your answer. I got this problem solved.
But I need some more information. Is there any way to find what process we need to attach to debug the DLL (MFC or ATL) like by codewalthrough or going through Registry Entries etc..
|
|
|
|
|
I'm writing a plugin for IE. It's needed to customize IE context menu.
I used CHostUIHandler::ShowContextMenu() for it. I have loaded
SHDOCLC.DLL inside this function and have gotten standard IE context
menu and it was restored.
OK.
But the context menu has additional menu items which have been loaded
from the registry:
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt
Now context menu has 2 separators only instead these additional items.
Can somebody to advise me how correctly restore IE context menu
completly.
Thanks.
|
|
|
|
|
Hello
I have a working Outlook COM AddIn and but I have run into a problem. I can’t figure out how to access the information contained in the Options Dialog under the tools menu. It appears that it’s possible to add more tabs to the dialog but not access the already existing ones. More specifically I need to access the “Always check spelling before sending” option on the ‘Spelling’ tab.
The COM places a button on the standard tool bar of the new mail inspector. The button simply sends the mail, and logs some details about that mail to an external application. However simply calling the MailItem.Send() function does not trigger the spell checker the same way actually pushing the Send button does. As a result I need to access the “Always check spelling before sending” option, so as to decide whether or not to show the spell check dialog.
The only other option I can see is to add an extra tab of my own to the options dialog and include some properties I can access. This seems stupid when there is already a perfectly good property hidden away some where.
Help me please I’m going insane
Gerry
|
|
|
|
|
please give me an example project where in ROT is used
Bhargava Alanka
|
|
|
|
|
I need an sample example of com component(code) where in the sever is implementing the Imoniker and it is been registered in Runtime Object Table.
please give me the client program to call that component
Bhargava Alanka
|
|
|
|
|
|
Hi freinds..
I wanna implement SNMPv2c and MIB-II under windowsXP plateform..... SNMP++ and AGENT++ APIs provided by HP people are providing all the ground work for the implementation of SNMPv2c, i have a confusion if someone out of you have used these APIs can clarify this ....
SNMP++ and Agent++ APIs are providing only the options of MIB II´s System and SNMP Group implementation.... But i want to implement all the groups in MIB-II. So using the same APIs is it possible to implement other groups?
Please give ur suggestions in this regard ... i will be grateful .....
Thanling you all in anticipation
Mukhan
|
|
|
|
|
In "CreateInstance" method of classfactory how can i know that the already a server is running. If we can know that how can we get a pointer to the object of component in "CreateInstance" method of classfactory.
Bhargava Alanka
|
|
|
|
|
|
|
I dont know in which context this question is?
Assuming asked in MFC context.
When systems starts any of mentioned operations it first send WM_QUERYENDSESSION message to application.
override it to trap above operations.
|
|
|
|