Click here to Skip to main content
16,009,847 members
Home / Discussions / COM
   

COM

 
GeneralGetting Number of Sub-storage count from a structured storage file Pin
bhave_subodh2-Jul-04 6:39
bhave_subodh2-Jul-04 6:39 
GeneralRe: Getting Number of Sub-storage count from a structured storage file Pin
darkbyte6-Jul-04 1:36
darkbyte6-Jul-04 1:36 
GeneralIOleObject Advise Pin
Anonymous2-Jul-04 6:24
Anonymous2-Jul-04 6:24 
GeneralMakiing Plugin for Windows Media Encoder Pin
Asim Saleh1-Jul-04 7:04
Asim Saleh1-Jul-04 7:04 
GeneralGot “Type mismatch” box when running a default Add-n project I VB 6.0 Pin
anderslundsgard1-Jul-04 4:46
anderslundsgard1-Jul-04 4:46 
QuestionCreating a simple add-in for e.g. MS Outlook… ? Pin
anderslundsgard1-Jul-04 3:00
anderslundsgard1-Jul-04 3:00 
AnswerRe: Creating a simple add-in for e.g. MS Outlook… ? Pin
Jörgen Sigvardsson1-Jul-04 11:35
Jörgen Sigvardsson1-Jul-04 11:35 
GeneralStrange ROT behavior question Pin
vipsy28-Jun-04 5:43
vipsy28-Jun-04 5:43 
Hi all,

Currently I'm writing two plugins for Windows Media Player.
One plugin is DSP processor and the other - Visualisation.

I need my plugins can communicate with each other though COM interfaces.

So I create my own moniker class to register one of the objects in ROT.

When my DSP pluging object is constructed I create moniker in the FinalConstruct (constructor) and register my object in ROT with ROTFLAGS_REGISTRATIONKEEPSALIVE flag.

Later when my vis plugin needs to communicate with DSP plugin it also create moniker and binds it to DSP plugin - all works ok.

But I cannot understand WHY when Win MediaPlayer releases my DSP plugin the plugin is destructed ? I mean that ROT also releases the pointer to my DSP plugin.

Actually that is what I really need, but from docs I would expect different behavior - I suppose that ROT holds "strong" (I wonder where the explanation this term) reference to my DSP plugin so it will remain in memory until Revoke ?

Also when I remove ROTFLAGS_REGISTRATIONKEEPSALIVE flag in IRunningObjectTable::Register method call my moniker cannot bind to object.

Short description on the object which being registered in ROT:

HRESULT DSPPlug::FinalContruct()
{
CComPtr<IMoniker> p = CreateMoniker();
...
CComPtr<IRunningObjectTable> pIROT;
::GetRunningObjectTable(NULL,&pIROT);
...
pIROT->Register(ROTFLAGS_REGISTRATIONKEEPSALIVE,this,p,&this->ROTRegValue);
}

void DSPPlug::FinalRelease()
{
CComPtr<IRunningObjectTable> pIROT;
::GetRunningObjectTable(NULL,&pIROT);
...
pIROT->Revoke(this->ROTRegValue);
}

Can someone help with explanation of those ?
Best regards,
Valery
GeneralRe: Strange ROT behavior question Pin
Jörgen Sigvardsson1-Jul-04 11:50
Jörgen Sigvardsson1-Jul-04 11:50 
GeneralBig trouble Pin
El'Cachubrey28-Jun-04 3:01
El'Cachubrey28-Jun-04 3:01 
GeneralRe: Big trouble Pin
darkbyte28-Jun-04 7:35
darkbyte28-Jun-04 7:35 
GeneralRe: Big trouble Pin
El'Cachubrey29-Jun-04 1:36
El'Cachubrey29-Jun-04 1:36 
GeneralactiveX in Matlab Pin
ffredoux28-Jun-04 2:32
ffredoux28-Jun-04 2:32 
GeneralRe: activeX in Matlab Pin
darkbyte28-Jun-04 7:30
darkbyte28-Jun-04 7:30 
GeneralRe: activeX in Matlab Pin
ffredoux28-Jun-04 21:45
ffredoux28-Jun-04 21:45 
GeneralRe: activeX in Matlab Pin
darkbyte29-Jun-04 1:45
darkbyte29-Jun-04 1:45 
GeneralRe: activeX in Matlab Pin
ffredoux29-Jun-04 21:22
ffredoux29-Jun-04 21:22 
GeneralRe: activeX in Matlab Pin
darkbyte30-Jun-04 3:36
darkbyte30-Jun-04 3:36 
GeneralRe: activeX in Matlab Pin
ffredoux30-Jun-04 5:07
ffredoux30-Jun-04 5:07 
GeneralRe: activeX in Matlab Pin
darkbyte30-Jun-04 7:10
darkbyte30-Jun-04 7:10 
GeneralRe: activeX in Matlab Pin
ffredoux30-Jun-04 8:57
ffredoux30-Jun-04 8:57 
GeneralRe: activeX in Matlab Pin
darkbyte30-Jun-04 13:39
darkbyte30-Jun-04 13:39 
GeneralRe: activeX in Matlab Pin
ffredoux30-Jun-04 21:48
ffredoux30-Jun-04 21:48 
GeneralRe: activeX in Matlab Pin
darkbyte1-Jul-04 7:19
darkbyte1-Jul-04 7:19 
QuestionCLSID of a COM object? Pin
M.C.27-Jun-04 19:14
M.C.27-Jun-04 19:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.