|
Hi , u are bit confused as i was when i started studying COM .
COM & DLL
=========
DLL is simply an extension for library component,which are ofcourse COM components ,yes dlls are COM
DIFFRENCE
=========
u may say dll are subset of COM
(although this relation is no good u can't compare them )
COM is a technology ,Dll is just an extension to a library file ,which is made using COM standard
USE OF MTS
==========
MTS handles/is used for following
-Transaction control
-maintainance
-administration
-security
-Extensibility
-Scalability
-Resource pooling & making an application in Tiers , u would know many other uses , as u gain experience
Hope u get smater by reading the above
regards
P.S. PATWAL
|
|
|
|
|
I am developing a C# UI. My boss wants "a menu like that used in the Visual Studio toolbox for GUI design". This is a very fancy ActiveX menu running up and down the left side of the Visual Studio UI. I would like to import this ActiveX control into my application from an existing COM type library. Any help identifying and locating said library would be most appreciated.
Bruce Crosby (brucec@dtn.com)
|
|
|
|
|
Hi All,
I have one DCOM server to which clients can logon and logout. DCOM server has many threads and it sends event notifications to all it's clients through connection point interface method(outgoing interface).
When client is working, I removed client machine from networking/powered off client machine. Then when server tries to send notification to client immediately, notification function is taking long time(nearly 1 min) to return.
How to get response from function immediately ? or there is any other way to handle this ?
Kindly help me ..
Regards.
|
|
|
|
|
I've a in-proc COM DLL that spawns a new thread which initializes as MTA. The COM objects created by this DLL are marked as ThreadingModel = Both. The COM object is intended to be consumed by VB apps & uses GIT to notify the clients of interesting events using the connection points.
The problem is that the performance is noticeably slower. If i rebuild the COM object as STA & don't spawn a new thread, the performance gets better. Infact, with a second thread & ThreadingModel = Free seems to outperform the ThreadingModel = Both though i can't really explain why this is so.
One of the main reasons for the second thread is to free up the main thread to handle the UI tasks (responsiveness) while the second thread handles all the grunt work behind the scenes & notifies only when something interesting happens.
While investigating this, came across the CoCreateFreeThreadedMarshaler & wondering if this would help. Does anyone have any experience with this? How do you go about debugging something like this? any pointers would help.
Thanks
Chen Venkataraman
|
|
|
|
|
Difficult to say in general way - what I would check is the fact, that the current instance of your object (marked as the Both) was created from VB app - therefore it is in Apartment mode. This can be reason, why all calls from your thread to your object will be also proxied through marshalling.
If I looked into the documentation for both & Free Threaded Marshaller I found:
For example, an STA model client creates the in-proc object in STA1 and marshals the object to STA2. If the object does not aggregate with the free-threaded marshaler, STA2 gains access to the object through a proxy. If it does, the free-threaded marshaler provides STA2 with a direct pointer to the object
This can explain why your code is slower when using the both model. I think in this case the FTM can help. How to integrate it, it's best to create new dummy component and say wizard about support for FTM (it involves FinalCreate , FinalRelease and COM_MAP ...).
What the FTM does is pretty simple (plusminus). It exposes from your object IMarshall interface, which signals to the COM, that your object supports custom marshalling. Then the FTM handles marshalling request in a different way from standard. Using some simplifications it switch off the marshalling for that object.
|
|
|
|
|
Dear all,
I have created a button in IE 5.5 ToolBar(Tool Band concept).then I have created(manually) a registry named as
ToolBand1 under HKEY_LOCAL_MACHINE/Software/ToolBand1.
If I execute that application(VC++),button name to be changed as ToolBand1 in IE.
How to change it through SDK codings?.
Pls help me...
Thanks for viewing this.Please help me.
|
|
|
|
|
Pls help me to my above problem...I'm totally frustrated after 2 days for not getting the ideas from codeguru friends.
Thanks for viewing this.Please help me.
|
|
|
|
|
Man, I doubt that (and fear it). COM is so entrenched in Windows it isn't even funny. Ever since Win95 COM has ruled everything from the taskbar to the desktop namespace to the very views on folders and other objects.
On the other hand, maybe we can finally learn the internals of Windows by reading the MSIL from the assemblies.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
Heiii !! I have no experience in c++/ATL but i know for sure that major portion of ur skills, which matters is not in ATL/C++ but using ATL/C++ for creating components , which u understand so well , is' it
It's functional knowledge what matters !
Anyways COM/COM+ is not dying , actually i don't c it now !
Cheeeers!!
P.S. PATWAL
|
|
|
|
|
Well... COM seems to die, and although I loose my "super skills", I feel happy about it.
I'm "sitting on" a large desktop application that uses a COM architecture - so I both know what COM means, need COM, and I made the promise "MS will never abandon that" to my boss.
However, "Knowing what COM means" is a two-sided blade. When I see the day-to-day problems my co'(s) face, and I know these things wouldn't be an issue under .NET, I'd happily scrap it for the "new thing". Well, I can't, and that might be a good thing.
Anyway, managed API's are more robust, and easier to use, and COM - while a good architecture as such - suffered from legacy issues and a bad infrastructure since the very beginning.
Nur wer feige ist tötet Liebe durch das Wort allein [sighist] | [Agile Programming] [doxygen] If you look for evil in me you will find it whether it's there or not.
|
|
|
|
|
Hi all,
I've written a COM plugin to IE which prior to loading itself checks the calling process' name. If it happens to be explorer.exe it should quit and not load. If it is iexplore.exe then things are ok...
Now, I've noticed that even if IE runs it can actually be run as a subprocess to explorer.exe. When this is the case, my COM plugin will not load when I want it to.
To my question: Under what circumstances is IE running as/under explorer.exe?
/Tommy
|
|
|
|
|
"IE", as you call it, is not really anything but a client. Namely, I refer to iexplore.exe, which is a COM client just like explorer.exe. WebBrowser2 is the automation server that can be hosted by practically any client. This is what has driven Windows since Windows 95 w/ IE 4.0 and ActiveDesktop - it's completely integrated (which the gov't failed to understand).
So "Internet Explorer" is merely a container application that hosts the WebBrowser2 control, advises its connection sinks, and provides UI services like Favorites and toolbars that can interact with the WebBrowser2 control.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
In my Visual C++ project, I adopted OLE Automation to access MS Word. The performance is rather disappointing. A single invocation to get a document object or get the selected range takes as long as over 10 milliseconds. I know invocations via IDispatch is slow. I read from a Visual C++ manual that such an invocation takes about 0.5 milliseconds. Where has the remained time gone? Does Word need so long to process a simple request?
|
|
|
|
|
coz its a dog
i've done a lot of word automation from VC++ and MS Word is....just bloody slow via automation
Bryce
|
|
|
|
|
Some software companies live only thanks to that. For instance, they sell Word/Excel native generators that are up to 10 times faster. So I guess that's good for us all that MS sells sh*tty code.
|
|
|
|
|
I worked with MS Excel automation.that is not too different...hihih KINDA SLOW STUFF
~CodeTheDreams~
|
|
|
|
|
here's my horrible situation:
there is a library that i want to use that operates on either a file or an IStorage object - if you give it a file, it will open its own storage via StgOpenStorage and proceed from there. so, really it likes IStorage, period.
however, my application already has a very nice I/O system in place where data can come from a file, a chunk of memory or from a set of user-defined callback functions. what i want to do is use my own I/O system.
what i need to know is, is there a reasonable way to create an object that implements IStorage so that I can use my own I/O system as the 'back end' ?
is there any good documentation on IStorage? i've looked at the MSDN and it doesn't really help me much - it assumes you're going to use StgOpenStorage and pals.
(yes. this is a repost, with better details)
-c
Zzzzz...
|
|
|
|
|
I only have about 1 week's experience with IStorage (I wrote a docfile viewer for work, we needed something better than the viewer that comes with VC), but as I understand it you can either use the OLE structured storage implementation (the one you get with the Stg* functions), or write your own.
For your situation, you'd write an implementation of IStorage /IStream , which would basically be pass-through calls to your own I/O system. Then create one of those COM objects and pass its IStorage interface to the library. The library has no idea what implementation is behind the IStorage it receives, it just knows that it can call methods in the interface. That is, after all, the whole point of COM.
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Michael Dunn wrote:
write an implementation of IStorage/IStream
any hints on how to do that? i can see their interfaces in the MSDN, but i don't have a good feeling as to what is really involved with implementing them (ie. how do the calls interact with each other, or modify the object, etc.).
-c
Zzzzz...
|
|
|
|
|
Chris Losinger wrote:
i can see their interfaces in the MSDN, but i don't have a good feeling as to what is really involved with implementing them
That's not what Michael said IMHO. You have to create a wrapper, and in the end, down the hills, just plug to the IStream/IStorage interfaces.
PS : the OLE compound file format is not documented. You are not likely to be able to implement these interfaces yourself, unless you buy a portion of the Windows source code. (or hack the net[^] to find debuting implementations, which I wouldn't trust by the way).
|
|
|
|
|
but ILockBytes is pretty easy to do. and that's what i've done. (see my reply to the root msg here)
-c
Zzzzz...
|
|
|
|
|
The easiest would be to provide an ILockBytes implementation (without the locking, jsut raw read & write), and use StgCreateDocfileOnILockBytes
You could even use the CreateILockBytesOnHGlobal....
Changing requirements are the crux of software development - you start with a sex drugs and rock'n'roll design, and end up with an aids crack and techno implementation [sighist] [Agile Programming] [doxygen]
|
|
|
|
|
|
...so I assume your last question is null and void?
Changing requirements are the crux of software development - you start with a sex drugs and rock'n'roll design, and end up with an aids crack and techno implementation [sighist] [Agile Programming] [doxygen]
|
|
|
|
|
IQuestion->Release();
-c
Zzzzz...
|
|
|
|