I am only a asm coder, duno C nor C++ ;-(

I want to learn COM, but I have no idea where to begin.
I have read some VC++ COM programming, but not able to understand ;-(

can all your experienced COM coders please give me some tips on where to begin my road to COM as easy as possible????

thank you all!

Posted on 2001-11-28 19:41:08 by Masata
You can start by asking your COM thoughts in the COM section (i suspect this thread will get moved :) )

Secondly, there are many smart people working with COM and im sure they will help you with more focused questions, but in general you need to get a good book on COM (Ernie tends to rave over one COM book (dunno the title tho), but you can find it in the COM section threads (go way back tho ie, early summer) )

Also, goto Ernie's web page and read his tuts (if you are able, they are quite technical, BUT written for MASM!! ). Ernie's World !

Second last, spend some time sifting thu the existing COM threads and discussions and pick up what you can. Some will be over you head, but some will be simple Q and A's.

Lastly, Go thru and study the Colib directory stuff. I started with Ernie's Short-Cut COM example (simple). I traced to all the included COM includes, and TOTALLY studied them. Once this was understood i had my feet on the ground with COM.

Best of luck!
Posted on 2001-11-28 23:03:43 by NaN
thank you NaN!

I will try my best!

Posted on 2001-11-28 23:49:09 by masata
Here is a list of four of the best books on COM:

"Inside COM"

"Inside COM"

"Inside COM"

"Inside COM"

(got that Nan?) ;-)
Posted on 2001-11-29 21:38:22 by Ernie
Got ya Ernie!

thank you, I will look for it ;-)

just curious, how long does it take u guys to understand COM???

Posted on 2001-11-30 00:22:18 by Masata
Myself about 1-2 months... (but i never bought any book)..

But i did hassle Ernie pretty good for a couple of weeks :)

Posted on 2001-11-30 15:44:51 by NaN
wow! I think I will need lot more than you did NaN ;-(

I have first confusion on:
Class Identifier (clsid) and Interface Identifier (iid)

what are they???
what they do???
what are their differences??
and is there a way to get those identifier by manually??

thankx all ^_^

Posted on 2001-12-01 00:00:38 by Masata
Im sure there is a more techically correct answer than mine, but in my own layman sorta way, heres how it goes:

First off, each are a type of "social insurance #" of microsoft COM's. Every com ever created is giving a 100% unique number (across all platforms etc), these #'s are their ID.

So if you want to talk to a certian com on the computer, you better have its "telephone" number....

So.. what are the types of Phone #'s you ask...

The class ID is a global COM package that has many smaller COMponents within its scope. Example i can think of is MS AGENT text->voice COM. It has only one Class ID (MS AGENT), but within it, there is about 7 or 8 different COMponents (Character, Animations, Voice settings, etc.).

The COMponets within the class, have their own ID, since they are COM's too... They interally all work together as a class, but if you want to adjust or change a setting, you need to get the INTERFACE ID and "dial" it up.

This is why the coinvokes us Interface ID's so much, they are actually what get things done. The class ID just gets the COM server started for your (initailized all the sub-componests etc. etc). Otherwise it would be pointless to set the character's graphics (thru Interface ID #), if none of the other components that make up the class are started.

A better analogy would be: Using only the IID (and not the CLSID) is kinda like starting a car's engine, but not having a car to put it in. Calling CLSID first, gives your a brand new shinny car, complete with crome, and initialized in the OFF state (and all systems (COM's) wired and ready to work for you). If you want to start your car, you take the IID and get a pointer to its inteface (say stearing column), and use this pointer to "start the car" thru coinvoke..

How this helps... (started a little thick, but in hindsight, i like the car analogy better :) )

Posted on 2001-12-01 00:38:32 by NaN
alrite NaN!

thanks for da analogies ;-)

I sorta know whats going with COM now,
its some kinnna similar stuff I did way back @ my highschool with pascal hahaha

I will keep working hard on COM,

thank you again for da helps.

Posted on 2001-12-01 03:39:00 by Masata
COM didn't take me too long to understand. C++ did.

My first dealing with COM was an attempt to re-use the MS script engines for a macro language for a VB app. Seemed fairly straight forward, but VB couldn't handle the script stuff directly, so I tried to learn just enough C++ to do this.

About 2 months into the project (which was suceeding, I could have VB open a dialog box via script, still was stuck passing a top object ref back so the script could control VB) I discovered MS had released a FREE version of this very same control.


So when learning ASM, COM seemed like a nice unexplored area. Bill T had scratched an opening to use COM in ASM, but creating COM objects was still there to explore. Took me about a month to get the orgional MyCom object to work and play from VB.

CoLib took 2-3 months for the first release, and most of that was working on the parsing stuff to use registrar files. That part still needs work.

I feel pretty safe to say COM is easiest to accomplish from ASM since COM is a binary interface, and makes most sense to us who play in real computer terms (DWORDS and such).
Posted on 2001-12-01 08:20:23 by Ernie
That pretty well sums up why i program in MASM 100% now....

I dont work for any fancy computer company or anything, so only programs i need to build are the ones *i* want. And past experiences playing with learning curves says MASM wins hands down every time (for the exact same reasons ~~ no need to "type cast" if you know what you want in MASM, and it doesnt take a rocket scientist to manage the difference between a 32 bit number and a 32 bit address (but C++ makes a *big* deal over this))

Posted on 2001-12-01 14:07:58 by NaN
Hey guys, guess what? ...???

I brought a COM book ;-) its called "Inside Distributed COM"

I couldn't find "inside COM" which is da book Ernie refers to T_T

I have looked ova some Topics now and its pretty good I think, haha I can't believe I can read that fast ;-)

Well, at least now I have some idea whats going with COM,
I think I am getting hang of it haahaha.....

its much easier than c/C++ or whatever.

but Thankx 4 all da helps guys, very appreciated.

Posted on 2001-12-02 02:52:38 by Masata