|
There are a lot of articles about COM/ATL here on codeproject...
- Anders
Money talks, but all mine ever says is "Goodbye!"
|
|
|
|
|
Hello,
I'm running the same executable under WIN200 Pro, SP3
and WIN200 Server SP2. This app uses the same InProc
COM control. BUT, under WIN2000 Server the call takes
approximately 15 times longer.
Any ideas/suggestions aree highly appreciated.
Regards,
Valeriy Raygorodetskyy
|
|
|
|
|
What does it do? Is it under COM+? Did you use procexp.exe?
|
|
|
|
|
Thanks for your responce.
No it is not COM+, just pure InProc guy which makes some
calculations (no database calls). And I did use DependencyWalker to be sure that I'm comparing apples-to-apples, but thanks for reminding about procexp.exe - I'll try it as well.
Valeriy
|
|
|
|
|
Hi,
I created a VbActivex dll and called the dll in the asp page using CreateObject Function.Dll is working Fine,but once after running the Asp page, then if i try to "make the dll" again after making some changes to it,I am getting the error:"Permission denied C:\winnt\system32\project2.dll".Only if i restart the System and then make the dll then it is getting compiled.Every time i cannot keep on restarting the system as and when i make any small changes.I am new to this concept.Can anyone provide me a solution for this so that i can make the dll again and again without system restart.I require ur help plsssss.
Thanks in advance
shankar
|
|
|
|
|
Restarting MTS(COM+)/IIS is a simpler solution
|
|
|
|
|
My situation:
I've created an ATL free-threaded exe server that contains one worker thread in an STA that created one central com object (this object does NOT lock the server). The worker thread put an interface to the central object in the GIT that the served up objects (in the MTA) use to access the central object....hence 'one-at-a-time' access to central object.
My problem though, is that I'm developing a rather complicated client that I have to terminate through TaskManager quite often.
At this point I want my ATL exe server to shut down because the central object uses system resources.
Doesn't the COM run-time layer have a kind of ping that constantly verifies the proxy-stub connection between processes? After the client is abnormally terminated the proxy disappears, doesn't the COM run-time then release the stub, and thereby call release on my served object?
Maybe i'm expecting too much from COM, but if so, is there another way?
thanks in advance,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|
|
You are expecting too much of COM (or Windows for that meter). kill -9 considered a bad programming practice in Windows. In Windows we do not crash programs just to terminate them. Read articles in MSDN on "graceful program termination".
|
|
|
|
|
I have written a vb class module which simply writes a string to a file and compiled this as a dll.Now when I registered this dll using regsvr32.exe from the system32 folder under WINNT directory in the win2k server,I can access this dll from my ASP code simply by using Server.CreateObject("dll name").
1>Is this dll a com?
2>Whats the difference between a com and a dll?
3>So if it is possible to access this dll through ASP by registering the component in the server registry,then what is the utility of using MTS in IIS?
Since I am a beginner in web development,I would also like to know about the other functionalities and advantages of using MTS with IIS.Address of any relevant web site dealing in similar topics will also help me a lot....
Thanking u all in advance...
Anirban
|
|
|
|
|
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~
|
|
|
|