|
Hello Friends !
I am developing a COM component which reads a structured storage file,which consists of no of sub-storages,
I want is to open the structured storage and get a count of
sub-storages in it.also i want to get the name of the first sub-storage...
Any one would please suggest how do i achieve this !
Thanks In Advance
|
|
|
|
|
From what i recall, the only way to do so is to actually open and parse the sub storage. But i might be wrong.
|
|
|
|
|
I have two programs that can be ran independently. However, when program A is running, it is possible to execute program B using COLEDispatchDriver. This causes the child program to load a particular CDocument object. I want the child program to inform the parent program whenever a new CDocuemnt object is created. Can IOleObject::Advise be used for this? It looks like the parent program would only be able to retrieve an IOleObject pointer for CDocument objects that already exist.
|
|
|
|
|
I am trying to make a plugin for windows media encoder using DMO. can any one tell me h0w to register it so that encoder recognize the plugin and what input and output type should i set. purpose of the plugin is editing like water mark.
Asim Saleh
Asim Saleh
|
|
|
|
|
What may be wrong when I got the dialogbox: “Type mismatch” when I try to run my Outlook 2000 Add-in at startup of Outlook.
Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
I’m about to create some kind of connection between one of my Applications to Outlook, to make the user of my app to use “stuff” in Outlook.
I think I’ve figured out that creating a add-in would bee one solution or… ?
I’m a C++ programmer and almost never programmed VB. Do I really have to learn it. (VB to me sounds so simple and boring…)
Anyway, if creating an add-in is the best solution – where do I start. I can’t really find any articles good for me.
All tips are welcomed – Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
Outlook supports automation (as most applications in the Office suite), if I'm not mistaken. Google for Office and OLE automation, and I bet you'll find a bunch of articles and howtos. You'll probably find stuff from CP
--
Ich bin Joachim von Hassel, und ich bin Pilot der Bundeswehr.
Welle: Erdball - F104-G Starfighter
|
|
|
|
|
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
|
|
|
|
|
I am as clueless as you about your problem. Would RegisterActiveObject() work for you?
I don't think revoking the ROT entry to yourself i FinalRelease() is a good idea. There's a cyclic reference there. The ROT has a reference to you, and you have a reference to it. Surely, there must be a better time to release yourself...?
--
Ich bin Joachim von Hassel, und ich bin Pilot der Bundeswehr.
Welle: Erdball - F104-G Starfighter
|
|
|
|
|
Hi
How i can solve this problem:
I compile my ATL dll simple object with MFC support in
VC 7.0 under win2000.And this object registered fine.
After this i try registered same dll under win98
and get error 0x0000045a.
When i compiled my other project under same conditions but with out MFC supporting, object registered fine in both system.
Both project use multi bytes characters set.
THANK.
|
|
|
|
|
Does the win98 system that you register the DLL on have the right DLL's installed ?
Try and see with Depends.exe if you are missing any dependant files !
DarkByte
|
|
|
|
|
I check it and all fine.There is all files necessary installed in 98 systems.
|
|
|
|
|
Hello there,
I'm student and I'm doing my training course. I'm developing a software within Matlab environment.
the aim of my software is to synchronise 2 applications (video and graphs). I use an activeX to read my movies.
i've read the Riazi's article about "using activeX in matlab".
my problem:
I want just to know how we can recuperate the callback of the play button of the activeX :
AMOVIE.ActiveMovieControl.2 ???
this activeX allow to read an avifile with the command "play, pause,
and stop".
any help will be appreciate,
thanks in advance
fredf
|
|
|
|
|
What does the Interface to the control expose ?
Does it expose any Events ?
You can view this using OleView or probably also in VB/VBA properties window.
DarkByte
|
|
|
|
|
I use an external interface: a control events.I have an event's list: statechange, positionchange, timer, opencomplete, click , mousedown...
It exist a function in matalb to view events: events(h)or eventlisteners(h).
fredf
|
|
|
|
|
I suggest you do a few tries, like maybe statechange could help you .. like when someone press play, state change goes from "idle" to "playing" .. and you check that type of state change.
Otherwise, see which other events are there and see if there's any you could dig your way thru.
|
|
|
|
|
I thank you for your suggestion. I did tries with statechange: I can see arguments of the events (source, eventID, Button, Shift). the argument 3 and 4 correspond to the Oldstate and the Newstate respectively. I succeeded to recuperate field values of them with command getfield: it return "0" for stop, "1" for pause and "2" for play. I tried then to change the value but matlab doesn't take that into account. I think that we can change this value to pass a remote order.
I hope that you can give me some suggestions again...
fredf
|
|
|
|
|
Depends on what you're trying to do.
Can you explain what you would like to do once you have identified Play was pressed ?
|
|
|
|
|
Well, I would like to recuperate the command (or callback) of the button play to pass a remote order.
I succeeded to include the activeX media player(interface Medai Player) in my code(that contains my graphs). Imagine the window MP on the left of the screen and the graphs on the right.
I would like to synchronise 2 applications (video and graphs).
For that, I must create a push button which allow to fire the boths applications (vidéo and cursor on my graphs). Maybe, I'm in a wrong way and it exist another way??I don't know. In any case, I'm chearching but it doesn't work. I hope that i've been clearly. You can put a question to me for more informations
best regards
fredf
|
|
|
|
|
Ok, i understand better,
Think of the following:
how would you start your Graph if you didnt have any Video on the side, if there was only the graph.
There's probably a Play method for the graph, or Start, or Run .. etc .. Maybe you need to have a global somewhere that points to the graph that you can access from within the Callback to tell the graph to start. Or maybe a member in the class that will intercept the status change. So, when you intercept that transition that the Play button was hit, just issue a Graph->Play() (or whatever would bring the same result).
Hope this helped.
DarkByte
|
|
|
|
|
Yes, I've thought to this solution, but the problem has no changed: how to recuperate the command (or callback)of the button 'play'. I must know it to add the callback of my graphs. doesn't it?
For my cursors on my graph, i don't use a play Method like Start or Run.
I plot my new cursor and delete the old at each second and I use the command "Pause(1)" between each plot. I don't know if it's the better solution but it work.
At any case, I thank very much you for your help and I will keep you informed on the evolution. if you have another suggestions, you can give them to me. I am taking!!
fredf
|
|
|
|
|
Didnt statechange event allow you to see the transition to Play ?
If you can catch the transition from Stopped to Play .. or from Pause to Play .. even from Play to Pause .. etc .. then you can know when Play was pressed. You could even know when Pause was pressed and put your graph on hold.
At least, that's what seems to be coming out of what you told me so far
DarkByte
|
|
|
|
|
yes i can see the transition to play (2), to pause(1), to stop(0).It's maybe more easier for you if I give you the code: in the commant history, please tape:
m= figure;
h = actxcontrol('AMOVIE.ActiveMovieControl.2', [0 50 300 300], m, {'StateChange', 'myStatechange'});
set(h, 'filename', 'C:\...\mymovie.avi'); %indicate the pathname
in my srypt 'myStatechange':
function myStatechange(varargin)
disp(varargin)
name= fieldnames(varargin{5})
varargin{4}= 0 %I'm trying to change the value of play to test
old= getfield(varargin{5}, 'oldState')
new= getfield(varargin{5}, 'newState')
if varargin{3}==0 & varargin{4}==2 | varargin{3}==1 & varargin{4}==2
disp('play')
elseif varargin{3}==2 & varargin{4}==1
disp('pause')
elseif varargin{3}==2 & varargin{4}==0 | varargin{3}==1 & varargin{4}==0
disp('stop')
end
I hope that will help you to target my problem
best regards
fredf
|
|
|
|
|
I'm sorry, i don't know MatLab, or the language you're using there which looks a bit like JavaScipt but has different comment delimiters.
In the conditional code that shows disp('play'), you should have code that starts your Graphs. Its as simple as that. Now how you get access to the graph object is another story but as i said previously, you could have a global object that you can access from anywhere that will allow you to start your Graph sequence.
I'm ok with giving tricks, tips, advices etc .. but you're the one that should code, not me. I have my own project out of which i require some help too sometimes, so i'll let someone else join in and help you if they can.
|
|
|
|
|
Is it possible to find out which CLSID was used to create a COM object? The only piece of information available to me is the pointer to the object itself. The object is created by some other process; I need to check its CLSID to figure out what I can do with it.
Thanks,
M.C.
|
|
|
|