How COM Object gets removed from the memory?
Suppose there are 4 clients using our COM Component, One by One they goes out of scope ..At which point the component knows that it has to unload from memory.? Once the COM Object's reference count reached to zero then at this point which mechanism works to remove it from the memory.
Once the COM Object's reference count reached to zero then at this point which mechanism works to remove it from the memory.
It is a responsibility of the COM object developer. When the reference count goes to zero then there are no references pending on the object (probably there aren't...: the reference count is shared mechanism of both the COM server and the client) and the object may choose to free its COM resources (as it usually do).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
I have a file which is in binary mode.(I am using stdio functions fwrie,fread,fseek)
I have to read this file in binary mode and needs to replace some of the bytes in this file.
It contains around 1000 entries with 2 bytes each.
I know the location of bytes which is to be changed, like 100th entry.
Is there anyway to change that specific bytes, without copying in to other file.
As I have small memory I can not copy into other file and recopy with changed bytes.
So on the fly i want to change specific bytes.
please tell me if any method is there to do this.?
I am doing an application where i am writing something to an excel sheet. Initially i am writing into 2 rows and coloums. i have the heading and then the values and then closing the file. Now at a later point of time i need to open the same file and append. starting writing from the third row. How can i do that?
I have a video playing in a video player. Irrespective of video player, I need the handle to the video being played. I have user-specified screen co-ordinates, now I need to convert the screen co-ordinates into frame co-ordinates of the video. To convert screen co-ordinates to video-frame co-ordinates and to further process video frames, I need handle to the video.
I am using Visual Studio and C++ for Win32 programming.
Are you wanting to create the additional views on the fly? or creating them in edition time (for instance a CFormView in Resource.h) and attaching / opening them in run-time? With or Without MFC?
If the second there is another approach to get it, I used it in VC6 with MFC. But it is quite long to explain, if it is not what you want / need.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpfull answers is nice, but saying thanks can be even nicer.
modified on Friday, January 22, 2010 4:52 AM
Last Visit: 21-Feb-20 21:50 Last Update: 21-Feb-20 21:50