- a beginner's question about COM
- Posted by ed on January 26th, 2004
tell me if this can be done by creating my own COM dll.
Take a technology that I originally developed in an MFC app and put it into
a COM server so other developers can take advantage of that technology in
their own software. The specific technology is not reliant on MFC, it just
used MFC for a user interface in that particular app.
Can this be done with a COM server?
thanks,
edware
- Posted by Boris Dynin on January 27th, 2004
"ed" <cteel2004.notthis@yahoo.notthis.com> wrote in message
news:egfRb.9612$g_6.1185@newssvr24.news.prodigy.co m...
Here're your options:
Strip MFC GUI portion of your code and expose the rest as COM interface(s).
It's called COM component; you can package it as DLL or EXE. Can be called
from C++ code.
You could expose your functionality as ActiveX control, which is COM object
that includes user interface (usually). Can be called from VB and C++ code.
Boris
- Posted by Christian Ehlscheid on January 27th, 2004
Hello,
snip:
--
"It's called COM component; you can package it as DLL or EXE. Can be called
from C++ code."
You could expose your functionality as ActiveX control, which is COM object
that includes user interface (usually). Can be called from VB and C++ code."
--
from which language it could be called is dependent on how the interfaces of
the COM object is designed ..
not if it is a visual control or not ..
if they are "custom" interfaces (directly derived from IUnknown (the base
interface every interface must derive from))the object can be called from
any language supporting VTable binding (e.g. Delphi, C, C++, VB also
supports it, and probably more ..)
if the designer wants the object to be callable from scripting languages
(VBScript, Visual FoxPro, ASP Script ... )
... he just has to derive it's interfaces from the "IDispatch" interface,
this has some more implication's on the actual design of the interface e.g.
only automation compatible datatypes can be used in such an interface ..
Regards
Christian
"Boris Dynin" <spam@noplease.com> schrieb im Newsbeitrag
news
plRb.10988$XF6.219965@typhoon.sonic.net...
- Posted by Boris Dynin on January 28th, 2004
"Christian Ehlscheid" <ehlscheid-no-spam@edv-ermtraud.de> wrote in message
news:bv5tq5$inn$06$1@news.t-online.com...
components.
In addition, VB is especially well suited for ActiveX use: for example,
event handler stubs are created automatically in design mode.
by now.
Boris
- Posted by Boris Dynin on January 28th, 2004
Actually, I made a mistake saying that VB6 code can only call IDispatch
based COM interfaces: user's guide states that VB supports V-table calls.
However, I believe the only datatypes allowed in that case are ones
supported by Standard Marshaller: BSTRs, VARIANTs, ints, etc. For example,
if my COM interface method takes a struct as parameter, there's no way of
calling it from VB.
Boris
"Boris Dynin" <spam@noplease.com> wrote in message
news:I0DRb.11142$XF6.222738@typhoon.sonic.net...