This COM thing is real cool!
-
:-( I can feel the strong pungent scents of heavy sarcasm blowing hard into my face :-( Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
Nish wrote: "I can feel the strong pungent scents of heavy sarcasm blowing hard into my face" Sorry, Nish. I wasn't trying to make fun of you. I know too little about .NET and C#, the number of articles is my only measure to judge the guruness of another person. :) :) :) The fact that you have evolved into a COM newbie says that you have a very bright future ahead of you. :) :) :)
-
Michael P Butler wrote: .NET is based upon COM, without COM then .NET wouldn't exist Can you elaborate more on that statement? Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
I'll leave it to the experts to elaborate, they can probably explain it better than I can http://msdn.microsoft.com/msdnmag/issues/1200/com/com1200.asp Michael :-)
-
Yipppeee! I wrote my first COM thingie :-) Of course it's only the example in the book. But despite the fact that I knew what to expect I was still thrilled, so thrilled I can't control my excitement. I mean I wrote the DLL, registered it. Then I used it from VB. Cool eh? Then I used it from ASP. Cooler eh? I haven't figured out how to use it from C++ though :-( But damnit, I mean this is so cool. I mean why did MS bother with .NET when they already had this COM thing? I mean, what's the bloody purpose! I am the newbiest COM newbie in this planet currently. But even I can see that it is so damn cool! Yippeee again...... How many COMites are here? Is Mike Dunn the only COMite Guru we have? Or is he still in those final pre-guru stages which take the longest period of time in the Guru attainment procedure? Coli, are you hearing this buddy? I am a COMite now. Halley's COMite :-) Regards COM newbie Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
EEeewww. COM Sucks. That's not a childish put-down; it's a succinct technical assessment.
-
EEeewww. COM Sucks. That's not a childish put-down; it's a succinct technical assessment.
Any particular area? As somebody who loves the COM programming lifestyle I'd be interested to know why you think it sucks. Michael :-)
-
Yipppeee! I wrote my first COM thingie :-) Of course it's only the example in the book. But despite the fact that I knew what to expect I was still thrilled, so thrilled I can't control my excitement. I mean I wrote the DLL, registered it. Then I used it from VB. Cool eh? Then I used it from ASP. Cooler eh? I haven't figured out how to use it from C++ though :-( But damnit, I mean this is so cool. I mean why did MS bother with .NET when they already had this COM thing? I mean, what's the bloody purpose! I am the newbiest COM newbie in this planet currently. But even I can see that it is so damn cool! Yippeee again...... How many COMites are here? Is Mike Dunn the only COMite Guru we have? Or is he still in those final pre-guru stages which take the longest period of time in the Guru attainment procedure? Coli, are you hearing this buddy? I am a COMite now. Halley's COMite :-) Regards COM newbie Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
Here's some lessons for ya: 1) If your COM object is a STA (Single Threaded Apartment) and you put threads in that apartment, ALWAYS include a message pump. You can add a message pump very easily by adding CWindowImpl to your derivations and adding the message pump. Then, while waiting on your threads to complete their task, process window messages in a loop. Otherwise, you'll freeze. 2) I find that though it's often very tedious and is a nightmare for C++ use of your object, you should usually opt for IDispatch as your interface. IUnknown is much easier and much nicer with types, but limits you heavily (no VB or ASP). 3) If you have a multithreaded STA that uses other STA's, ALWAYS ALWAYS ALWAYS marshal your interfaces. In something like a simple dialog application (MFC) passing around your STA object (smart pointer) by pointer is fine in the same thread. However, don't do this in multithreaded applications. It will work sometimes.... but will often screw you up in hard to find/debug ways. Marshalling is always the way to go and it won't hurt you to use it if you don't need it. 4) If your COM object is written in ATL and IDispatch derived, be prepared to use BSTR and VARIANT's. VB and Scripting simply can't deal with anything else appropriately and you'll frequently find hard to debug problems if you get it working without it. Best of luck! ;)
-
Nish [BusterBoy] wrote: In Indian money that'd be a pretty decent amount of money Really ? I presume you mean US$ ( AU$5.50 an hour ), but even then - I make a bit over AU$20 an hour and I make half what I'd expect to make if I moved to the mainland, at a minimum. No wonder people keep posting for Indian programmers. I know if I needed any work done, I'd pay you US$3 an hour in a second, then lie awake at night feeling guilty that it was so, so little. I don't think anyone beyond street mimes and paper boys get $3 an hour, it's just my standard response, as in when I get poor service from McDonalds or the local supermarket I will call the manager and say 'I know it's hard getting decent staff when you pay $3 an hour, but...', or if my daughter doesn't get her toy with her happy meal, I tell her it's because the people who work there are monkeys who work for $3 an hour. Christian I have come to clean zee pooollll. - Michael Martin Dec 30, 2001 Picture the daffodil. And while you do that, I'll be over here going through your stuff. Picture a world without war, without hate. And I can picture us attacking that world, because they would never expect it.
Sonork ID 100.10002:MeanManOz
I live in Bob's HungOut now
The average Indian software engineer makes between Rs 15,000 to 25,000 per month which is cosidered pretty good here. Lets assume he works 25 days a month averaging 8 hrs a day. That gives us 200 hrs. Thus for 15,000 he makes Rs 75 /hr which is US$ 1.60 and the 25000 guy makes Rs 125 an hr which is USD 2.65 If you offer someone $3 per hr for 200 hrs a month he'd jump for it :-) Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
Jon Sagara wrote: Sorry Nish, that was another lame play on words by yours truly. I don't know what the correct terminology is. I know Jon. That's why I put the wink-smiley. I was simply playing along with the joke :-) Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
Didn't you know that Stalin created ATL ? Sorry to dissapoint you all with my lack of a witty or poignant signature.
-
Nish [BusterBoy] wrote: My grammar sucks like Lotus Notes, Just out of curiosity, what makes you think Lotus Notes sucks... Cheers Kannan
-
The average Indian software engineer makes between Rs 15,000 to 25,000 per month which is cosidered pretty good here. Lets assume he works 25 days a month averaging 8 hrs a day. That gives us 200 hrs. Thus for 15,000 he makes Rs 75 /hr which is US$ 1.60 and the 25000 guy makes Rs 125 an hr which is USD 2.65 If you offer someone $3 per hr for 200 hrs a month he'd jump for it :-) Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
Before you get any offers, Nish, be sure to stipulate that you have to be allowed to telecommute. If you tried to live here, for instance, on $3/hr, you'd have to live in a ditch, bathe in the river, and the only meal you'd be able to afford would be from McDonald's. And that would only be a couple of meals a week...
-
Before you get any offers, Nish, be sure to stipulate that you have to be allowed to telecommute. If you tried to live here, for instance, on $3/hr, you'd have to live in a ditch, bathe in the river, and the only meal you'd be able to afford would be from McDonald's. And that would only be a couple of meals a week...
Let's start a global campaign to get Nish a job in one of the rich countries so that he can contribute to the following items: tax to support George W or Tony B, rent to keep the landlord happy, charity please various churches, education for the next two generations, welfare for the unemployed, healthcare for the poor, defense budget to start a few more wars in the middle-east, ... ;)
-
Before you get any offers, Nish, be sure to stipulate that you have to be allowed to telecommute. If you tried to live here, for instance, on $3/hr, you'd have to live in a ditch, bathe in the river, and the only meal you'd be able to afford would be from McDonald's. And that would only be a couple of meals a week...
By $3/hr I meant working from India. In the US that'd automatically go to $50 an hr Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
Let's start a global campaign to get Nish a job in one of the rich countries so that he can contribute to the following items: tax to support George W or Tony B, rent to keep the landlord happy, charity please various churches, education for the next two generations, welfare for the unemployed, healthcare for the poor, defense budget to start a few more wars in the middle-east, ... ;)
abc wrote: defense budget to start a few more wars in the middle-east, ... Geez!!!! Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
Didn't you know that Stalin created ATL ? Sorry to dissapoint you all with my lack of a witty or poignant signature.
I thought it was Hitler. By the way are the rumours about Saddam Hussain being behind .NET true? Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut
-
Here's some lessons for ya: 1) If your COM object is a STA (Single Threaded Apartment) and you put threads in that apartment, ALWAYS include a message pump. You can add a message pump very easily by adding CWindowImpl to your derivations and adding the message pump. Then, while waiting on your threads to complete their task, process window messages in a loop. Otherwise, you'll freeze. 2) I find that though it's often very tedious and is a nightmare for C++ use of your object, you should usually opt for IDispatch as your interface. IUnknown is much easier and much nicer with types, but limits you heavily (no VB or ASP). 3) If you have a multithreaded STA that uses other STA's, ALWAYS ALWAYS ALWAYS marshal your interfaces. In something like a simple dialog application (MFC) passing around your STA object (smart pointer) by pointer is fine in the same thread. However, don't do this in multithreaded applications. It will work sometimes.... but will often screw you up in hard to find/debug ways. Marshalling is always the way to go and it won't hurt you to use it if you don't need it. 4) If your COM object is written in ATL and IDispatch derived, be prepared to use BSTR and VARIANT's. VB and Scripting simply can't deal with anything else appropriately and you'll frequently find hard to debug problems if you get it working without it. Best of luck! ;)
Thanks Matt. It didnt make 100% sense to me, but thanks anyway. I read it once. That should be useful for me later when I actually get to some marshalling or stubbing or whatever :-) Nish Sonork ID 100.9786 voidmain www.busterboy.org If you don't find me on CP, I'll be at Bob's HungOut