|
-
Aug 26th, 2004, 07:57 PM
#1
Thread Starter
New Member
What is it?
What is COM. I always see it, and I'm learning VB now. I can't seem to get a straight answer on COM.
Kung Fu is for everything, everything is Kung Fu= Time+Energy
-
Aug 26th, 2004, 09:46 PM
#2
From MSDN:
Component Object Model (COM)
The OLE object-oriented programming model that defines how
objects interact within a single process or between processes. In
COM, clients have access to an object through interfaces
implemented on the object.
COM Overview
The Component Object Model (COM) is a binary standard that
defines how objects are created and destroyed and, most
importantly, how they interact with each other. As long as
applications follow the COM standard, different applications from
different sources can communicate with each other across
process boundaries. People use COM to make communication
with other applications easy.
Because COM is a binary standard, it is language independent.
You do not have to use C++ to implement COM. You can use any
language that supports tables of function pointers.
A COM interface is a collection of logically related methods that
express a single functionality. For example, the IAsyncReader
interface enables reading of MEDIATYPE_Stream data. All COM
interfaces derive from IUnknown, and all are named by a globally
unique interface identifier (IID).
A COM class is an implementation of one or more COM interfaces,
and a COM object is an instance of a COM class. A Microsoft®
DirectShow™ filter, for example, is a COM object. Each object has
a globally unique class identifier (CLSID).
Kinda formal explanation, but just search the forums for some
examples that may give you a better explanation.
HTH
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Aug 27th, 2004, 08:03 AM
#3
Thread Starter
New Member
Thanks. Um, basicly COM helps .exe files communicate with each other. Can COM pass information from application to application? How would I develop COM functions, what is the environment and how would I find the syntax?
Kung Fu is for everything, everything is Kung Fu= Time+Energy
-
Aug 27th, 2004, 12:45 PM
#4
I haven't really used COM outside of MS Office, but this is the
same. If you add a reference to MS Access in a new vb standard
project, you can use the Object Browser to see all the objects,
properties, and events available from Access. You can add
another reference to MS Excel and see its Objects the same way.
Then you can create an instance of Access and Excel and
automate them through VB. You would be using Components of
Access and Components of Excel. Basically COM is Components
that can be reused in other applications by referencing their
object libraries. I may not have the entire concept, but this is the
basics. I suggest searching for examples and tutorials to help you
more.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 2nd, 2004, 03:03 PM
#5
Thread Starter
New Member
MS Office and COM
so, COM is mainly used to communicate between MS Office applications like Word and Excel? What environment is COM developed in?
Kung Fu is for everything, everything is Kung Fu= Time+Energy
-
Sep 2nd, 2004, 03:31 PM
#6
Not at all. COM is used in multi-tiered apps. You write a dll for one
program, and say, you need to use some function in another app,
then you could create an instance of the object and execute the
function. I am probably not explaining everything correctly, but I
am still learning COM or distributed applications.
COM objects could be written in C++ or VB I believe.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 3rd, 2004, 02:07 PM
#7
Re: MS Office and COM
Originally posted by SEGACIOUS
so, COM is mainly used to communicate between MS Office applications like Word and Excel? What environment is COM developed in?
COM exists as a Windows Communication Layer used as a Marshaling medium used for Inter-Application Communications.
IE.. App1 -> Windows -> App2 -> Windows -> App1
P.S. Com, OLE and, ActiveX can be used interchangeably. Microsoft has changed all those definitions over the years and they have all at one time meant the same thing.
AFAIK no other OS supports COM, although some could argue SOAP is a version of COM... or was that CORBA...
-
Sep 3rd, 2004, 02:17 PM
#8
This article (pushing COM development) has a good description of multi-tier (or is it multi-layer ) development (It's a good read).
http://msdn.microsoft.com/library/de...complus4vb.asp
-
Sep 3rd, 2004, 02:19 PM
#9
-
Sep 5th, 2004, 01:47 PM
#10
Thanks Dave for a much better explaination.
VB/Office Guru™ (AKA: Gangsta Yoda™ ®)
I dont answer coding questions via PM. Please post a thread in the appropriate forum. 
Microsoft MVP 2006-2011
Office Development FAQ (C#, VB.NET, VB 6, VBA)
Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
If a post has helped you then Please Rate it! 
• Reps & Rating Posts • VS.NET on Vista • Multiple .NET Framework Versions • Office Primary Interop Assemblies • VB/Office Guru™ Word SpellChecker™.NET • VB/Office Guru™ Word SpellChecker™ VB6 • VB.NET Attributes Ex. • Outlook Global Address List • API Viewer utility • .NET API Viewer Utility •
System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6 
-
Sep 8th, 2004, 08:38 AM
#11
Other points of interest (for the truly bored) are IDL (Interface Description Language) and ATL (Active Template Library), which are the foundations which COM is built on.
-
Sep 24th, 2004, 03:02 PM
#12
Lively Member
The best description for com is :
An programming indepent system for developing reusable components
COM is an interface that can communicate with almost any programming language.
The main advantage is that i could write an component in C++ and (if i do it by the rules) VB can use that component.
The only prob is that C++ have way more flexiblity to bend the rules of com than VB so lot's of components work very poor with other languages.
Even Microsoft didn't always obeys it's own rules.
-
Sep 24th, 2004, 03:04 PM
#13
Lively Member
Originally posted by Dave Sell
Other points of interest (for the truly bored) are IDL (Interface Description Language) and ATL (Active Template Library), which are the foundations which COM is built on.
ATL is an library which can be used to build COM, but COM componets can also be build using MFC
-
Sep 24th, 2004, 03:04 PM
#14
isnt ATL built on top of MFC?
-
Sep 24th, 2004, 03:13 PM
#15
Lively Member
Originally posted by Dave Sell
isnt ATL built on top of MFC?
Nope, ATL is an complete differnt,
they can be used in an single component, but they can also be used indepently.
Actually ATL was created to get rid of the overhead of MFC, it's used to create lightweight and fast code, as MFC is used to create slower bulkier code.
Rule of thumb :
MFC => Mainly GUI (clients), nowadays actually VB(.net)
ATL => Mainly fast (COM)DLL's without an GUI interface.
ATL+MFC => (com)DLL's with an GUI
MFC=> (com)DLL's just as fast as VB activeX, so no need for it to do it in C++ then
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|