|
|
Orchid XP v8 wrote:
> They have a beta already? Damn, that was fast...
No, the beta is already *expired*. :-)
>> Yes. It's a dynamically-linked library. Says it right there in the
>> name. :-)
>
> In other words, it's a shared library. I more or less knew they before. ;-)
Not necessarily shared. Just dynamically linked. It happens that on Windows
(and Linux, as far as I know) that such libraries are indeed shared. But you
can have dynmamic linking without sharing and you can have sharing without
dynamic linking.
> (According to Wikipedia, seems to be GetProcAddress()...)
Yes.
> Sure. But in this case, I'm talking about Microsoft RPC. As in, that
> service that if it stops running, your entire PC shuts down for some
> reason... (MS Blaster, anyone?)
It shuts down because huge amounts of the OS are built premised on the
availability of COM. It doesn't completely shut down, of course, but
everything *interesting* does.
> According to the documentation, you write an MIDL file, and the compiler
> generates a header file and two C source code files.
It generates a TBL file, which your tool then reads to generate whatever
language-specific bindings you want.
> Because the MIDL compiler generates this code, so technically you don't
> need to know how it actually works.
A) No it doesn't. It also generates a TBL file.
B) You'd have to know how it works to interface it to any language not
written in C.
> I'm reasonably sure NT 4 has DCOM,
Could be, could be.
>> Exactly. Plus, it's an active object, i.e., what people call an "Actor".
>
> ...you mean the object can be doing other stuff by itself before you
> specifically ask it to do something?
Yes. As I said, "Excel" is a COM object. It's running in a separate process.
That's why it's not just a DLL.
>> A process running Excel is basically one big COM object, with methods
>> like "open a spreadsheet" and "return the value of column B row 27."
>> That's how people do these automation tasks.
>
> Heh. I had always assumed that such tasks are simply impossible, because
> I've never come across a programming language that can do them. (Well,
> except VB. And who the hell understands that?)
*Every* language can do it. I've done it from Tcl (as well as writing COM
servers). It's trivial from C# and as trivial as anything is in C, and VB,
and WSH. Like I said, WSH is basically a shell designed to do nothing but
COM calls.
> But, uh, isn't IDispatch::Invoke *itself* a COM method??
>
> Seriously, I see CoInitialise() and CoUninitialise() to start/stop the
> COM library. I see CoGetClassObject() and CoCreateInstanceEx(), but I
> can't see a CoCallMethod() or similar anywhere.
Hmmm. Well, ship me the two C files from your MIDL, and I'll tell you what
the call it. :-)
> Well, maybe I need to sit down and spend some time creating "COM
> support" for Haskell, and then everything will become trivial. :-P
That's the general idea, yes.
--
Darren New, San Diego CA, USA (PST)
I ordered stamps from Zazzle that read "Place Stamp Here".
Post a reply to this message
|
|