|
Hi,
well have not exactly an idea, only what I would check very carefully are the circular references in VB. I think, that the similar things happened to me some time ago, when I 'developed' a circular reference through three objects and the VB garbage collector didn't detect it and failed on some exception.
What can be next thing is some topics similar to it - returning a pointer to memory which is later freed inside the component (normally one should return a copy of the memory, because VB will release it later) and similar thingiez.
In short, first who will be suspect for me in such a case will be the VB garbagge colector.
|
|
|
|
|
hi
But how can I solve this problem . You know ,anyway ,if the program have such a bug ,my boss will not be satisfactory with me. I have try many times these days, but failed.
Can you give me some advice on how to resolve this problem. It'll be appreciated.
thx.
regards.
|
|
|
|
|
Yeah. Bosses are allways the same. Anyway, this is very difficult question. It depends on the program design. Normally I am checking nearly everything regarding all return values especially returning some memory structures (BSTR, VARIANTS, arrays...). Also I am checking the dependencies and ownerships you can sometimes see, that object A points to object B and object B points to object C while C points to A - this is exactly the situation where VB garbagge collector crashes. Good luck!
|
|
|
|
|
Hello,
I am trying to replay a set of recorded events in WebBrowser. I am able to record and replay the events like keypress and click events on the html page displayed in the browser.
However, when i am replaying events like keypress into a text box and then a click on submit button, the application does play the events but i am not able to see the text entered inthe text box on the HTMl page.
Similarly if there more text boxes and events are replayed on them then the text is seen only after the function for replaying of events returns.
for e.g. Google's page has a textbox and Google search button. If i just record events in the text box without clicking on search and replay them back i am able to see the text in the textbox after the replaying is complete. However if i also press click on the search button and try to replay these two events then the app puts the text and clicks the button and navigates to result page and thus the events are replayed properly, but the text is not seen in textbox before navigation.
Further info:
I am using WebBrowser in VC++ and IHTMLDocument2 pointer. With this i am able to get the HTML of the element and compare it with the recorded event's HTML. When i find the element(IHTMLElement) i use either a click() or put_innexText() api's depending on whether it was a click or a keypress event.
I have tried to run the function which replays events in OnDocumentComplete(), directly and then again inside a thread so as not to interfere with the documentcomplete process. I have also tried to use sleep in OnBeforeNavigate().
Secondly, I have tried to use PostMessage and SendMessage and keybd_event() apis to see if they make any difference. All this has failed.
Please somebody help me with this. Thanks in advance.
Regds,
Prasad.
Prasad
Thanks again
|
|
|
|
|
modified, after read it completely . just a wild shot - maybe IE needs some time to refresh it's window, or, this might depend on the app design, somehow during the playback, the IE window messages are not handled or something like that (this can be specially if your player is an inprocess component and it seems to me that it is).
If I looked to furhter info, it looks to me so, that you fill the textboxes or whatever, but there is no time to display it.
What I will try on your place is to process the messages after each change (PeekMessage, DispatchMessage...). This might help
|
|
|
|
|
Thats right IE basically is not updating the component after the text is entered. It does have the time to update it. I am iterating through a linklist picking up events and then firing them, so i just need to get out of that loop. Say for eg by displaying a dialog box.
I have currently solved this problem by using postmessages and sleep in my dll.
Thanks anyway, I will try to check out ur solution too and let u know.
Prasad
Thanks again
|
|
|
|
|
Hi All,
I'm trying to set a top-level exception call-back filter inside a com+ application server.
Although SetUnhandledExceptionFilter seems to succeed, that it returns the previously installed filter correctly, my filter never been called.
of course I'm trying to detect the call in a (release mode) through a simple code that creates a log file to be filled later with the proper informations I need for recovering.When calling the filter from a __try/__except(MyFilter(..)) block, the filter code executes correctly, but when generating a purposly unhandled exception the file is never been created.
Any idea?
Regards.
AbuMalek
|
|
|
|
|
hi,i am trying to save the ppt file into html,
and i call "saveas" to do it,but if the ppt file
is bigger ,it very slow!! how to make it faster??
welcome
|
|
|
|
|
hi all,
i want to make a plugin for my internet explorer..can i do so in vc++ or using com...i dont have any idea..if someone can help please do so..
best regards...
himanshu
|
|
|
|
|
For IE you have to play with MS COM, as everything is exported through interfaces. So you can do it in VC++ using COM .
What kind of plugin it should be? There are different plugins for IE - protocol plugins, some toolbars...
|
|
|
|
|
hi,
Thanks for ur reply..i want a plugin that does a specific work for IE..e.g.as google toolbar..i hope this can be created..
regards
Himanshu
|
|
|
|
|
|
hi,
thanks for ur help..i am trying to develop this in vc++...ur help as nice though...i appreciate ur support...
thanks a lot...if there is anything u find..pls send it to me..
himanshu
|
|
|
|
|
The project I'm working on is moving from good old DCOM to COM+. I find it hard to solve one issue. Back in DCOM days, when you had data that had to shared by all the objects of a class, there was no problem holding inside the DCOM EXE server and letting all instances know of it (data such as a list of connected currently connected users, etc).
How do I do it in COM+, as all objects are created through surrogate DLLs ?
Thanks,
Omer.
|
|
|
|
|
If you are using a C++ server, it's simple, it's just a matter of creating a global DLL variable.
If you want to use the COM+ way, or for VB DLLs, you can use the Shared Property Manager (SPM), which is designed exactly for this.
I see dumb people
|
|
|
|
|
I need a whole Data structure (and not a simple one). If I understand correctly, what you suggest is to wrap it up with COM and pass it around to all instances this way or another. Isn't there a simpler solution ?
|
|
|
|
|
No you don't need to wrap it with a com object, simply you need to keep your data structure as a global variable to the dll module then provide a code that manipulate that structure with a multi-threaded-safe fasion and you are done.
if you want to avoid writing syncronization code you can rely on the sahred property manager as daniel advised.
AbuMalek
|
|
|
|
|
I would like to know how to implement a schedule in VC. I am familiar Java than VC. In Java I did use Timer and Thread. But in VC, I dont know.
Please drop to me some line if you know!
Thanks
|
|
|
|
|
Uhm, this forum is about COM. You probably want to ask your question in the Visual C++ forum.
When asking the question in the Visual C++ forum, also specify whether you're using ATL windowing, MFC or Win32. That would help people help you better.
--
If I had the ability to smooth talk like John Simmons, this post would be less sarcastic and more to the point.
|
|
|
|
|
I'm trying to insert an object from a file into a document. How does the filename get passed to the OLE server to open it up to display into the container application.
thanks
|
|
|
|
|
Dear experts,
I am looking for code tips on how to attach a template to a word document using a DLL or COM component.
I know word gives this feature in their menu using tools->Templates and addIn option, but I need this feature to be available as dll so that it can be called by programs that can automate the convertion of word document look and feel.
The dll function will receive the inputs - the word document and the template to attach and the output will be the word document with new template attached to it.
Any tips on this highly appreciated. Thanks
|
|
|
|
|
Hello!
How can I force my IE toolbar plugin to be visible at next start of IE after installation?
By default, user have to check my plugin in View->Toolbars->... menu to enable it. How can I do it automatically?
Thanks in advance for all answers!
Dmitry Yu. Babokin
|
|
|
|
|
hi,
i am a new developer looking for some help here..i am trying to develop a IE plugin as u must have created...what do i need to start with it..i dont have any idea..
please help..
regards
Himanshu
|
|
|
|
|
I've been working with COM for many years now but never really had much need
for any threading models except MTA's. Now I'm working on a project where it
does matter and, after reading some articles and docs in MSDN, have a few
questions:
Basically, I'm writing this BHO that gets initialized with every instance of
Internet Explorer. I use CreateFileMoniker to get an IMoniker for the config
file then use IMoniker::BindToObject to bind it to a configuration object. I
would like each instance of my BHO to call a single instance of this
configuration file. Would the STA threading model help me acheive this
singleton approach?
Also, if this instance approach is possible, does each instance of the BHO
(say, in FinalConstruct()) need to go through the whole Moniker bit, or does
only the first instance of the BHO? I'm also a little new on monikers (I've
used them a little before and understand all the docs well-enough), so I'm
not exactly sure about using monikers within multiple threads (the ROT is
only supposed to hold one instance of the moniker no matter how many times I
use CreateXXXXMoniker, right?).
PS: I've been looking for some decent online examples (including in the MSDN
library) to fill-in the gaps (so to speak) dealing with monikers and
threading but have found none. Anyone know of any URL's?
TIA
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
I think that the Threading Models and the Monikers are separate entities.
Threading Model is a type of apartment of COM object.
Moniker is a way to get a pointer to an object. Moniker as COM object has own Threading Model. Even it has own custom "by value" marshalling.
About BindToObject, look at MSDN "IMoniker—File Moniker Implementation".
As far as I know, pMoniker->BindToObject(pBindContext,NULL,riid,&pObj) will return the same object (i.e. singleton):
1) if pMoniker was created with the same lpszPathName and pBindContext is the same, i.e.
CreateFileMoniker(lpszPathName, &pMoniker1);
CreateFileMoniker(lpszPathName, &pMoniker2);
pMoniker1->BindToObject(pBindContext,NULL,riid,&pObj1);
pMoniker2->BindToObject(pBindContext,NULL,riid,&pObj2);
// here pObj1 == pObj2. It does not depend on type of object being bound.
2) if pMoniker was created with the same lpszPathName and object is registering itself or by moniker in ROT with the equal moniker, i.e.
pRunningObjectTable->Register(grfFlags,pObject,pFileMoniker,&dwRegister)
pBindContext has no meaning.
Simply speaking, moniker searches similar moniker in ROT or in a binding context. If no success, moniker will create new object.
Sorry, if I am not able to explain such complicated subject more cleanly.
With best wishes,
Vita
|
|
|
|