473,809 Members | 2,763 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Basic knowledge regarding COM

Hell
This is a very basic question i know :O

Formerly I developed in VisualBasic 6.0 and when a project is started you can select different project types.

But what exactly is an ActiveX DLL? - Is it considered as a COM object

I've heard something about its not a real dll because of the iUnknown, but what's that

Im sorry for my lack of knowledge, but if someone could give me a quick primer I would be very happ

Kind regard
Janu

Nov 20 '05 #1
2 2113
Take a look at this article...

http://www.codeproject.com/com/comintro.asp?target=com

It may be more than you wanted to know, but it gives a good overview of COM.

Scott
"Janus" <an*******@disc ussions.microso ft.com> wrote in message
news:84******** *************** ***********@mic rosoft.com...
Hello
This is a very basic question i know :O)

Formerly I developed in VisualBasic 6.0 and when a project is started you can select different project types.
But what exactly is an ActiveX DLL? - Is it considered as a COM object?

I've heard something about its not a real dll because of the iUnknown, but what's that?
Im sorry for my lack of knowledge, but if someone could give me a quick primer I would be very happy
Kind regards
Janus

Nov 20 '05 #2
"Janus" <an*******@disc ussions.microso ft.com> wrote in message
news:84******** *************** ***********@mic rosoft.com...
Hello
This is a very basic question i know :O)

Formerly I developed in VisualBasic 6.0 and when a project is started you
can select different project types.

But what exactly is an ActiveX DLL? - Is it considered as a COM object?

I've heard something about its not a real dll because of the iUnknown, but
what's that?

Im sorry for my lack of knowledge, but if someone could give me a quick
primer I would be very happy


Okay, this is a very basic overview, but it should help get you started:
A 'traditional' DLL is the Windows sense is a flat library that exports some
functions. There is no sense of object orientation really, although you can
actually export classes in a DLL through C++, but let's not go into that.
Most DLLs are just global functions, no classes or objects.

Microsoft Component Object Model (COM) is a set of rules on binaries
determining how they communicate. This communication happens between COM
objects, and is done via well defined interfaces. A component class
(coclass) must implement one or more interfaces. All interfaces derive from
IUnknown, so every coclass at least implements IUnknown. IUnknown defines
three methods: AddRef, Release and QueryInterface. The last one lets you
access the other interfaces an object exposes. The first two deal with
reference counting, which is how an object's lifetime is governed in COM.
Every time a reference is added, a counter is incremented. When the
reference is released, the counter is decremented. When the counter reaches
zero, the object is destroyed. All objects in VB6 are COM objects, but all
the details of that are abstracted away. Objects in VB.NET (and .Net in
general) are not COM objects, they are .Net objects (duh! ^_^). Their
lifetime is governed by Garbage Collection, not reference counting.

COM servers can reside in several types of files. The most common type of
COM server in an In-Process Server. This is a DLL that is loaded in the
process of the client application (hence the name in-process). They are real
DLLs, but to get at their full functionality you need to use COM, not just
traditional DLL techniques. A COM DLL typically still exports at least two
methods, used to access the coclasses in the DLL.

ActiveX is a technology built on COM. An ActiveX object is a COM object that
follows certain conventions. It for instance will always support Automation,
which means it supports the IDispatch interface next to IUnknown.

An ActiveX DLL is not a COM object. An ActiveX DLL is a DLL defining ActiveX
objects. ActiveX objects are COM objects.

I hope that answers your question.

--
Sven Groot
Nov 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
1821
by: Francis Lavoie | last post by:
Hello I have some questions regarding webframework, I must say that I quite lost and these questions are basicly to help me understand the way it work. I have some knowledge with PHP and JSP. I have looked for a python web framework to build a web site, a site that I had start in php (and quite finish), but for some reason I wont explain, I lost everything. I have started writting app with python 6
3
1725
by: TRB_NV | last post by:
I've read hundreds of posts regarding this, but haven't got a working solution yet. Does anyone have a working snippet of code from an ASP page that can be used to upload a file to an FTP server? I read all about INET, but due to some licensing issues it won't work. I've got an unrealistic deadline from management and amazingly finished everything else, but this last bit is holding me up. Thanks
5
5718
by: Lee David | last post by:
I went to the sun site and downloaded what I hope is the development part of java. I downloaded JDK5 with Netbeans. I installed it and now have a folder in my program group "Netbeans". Is that java? Would I execute that to create a java application? TIA, Lee
2
1619
by: Joel Vazquez | last post by:
Visual Basic.NET Application RunTime Crashes and Stalls Im a newbie if you could say in .NET ive been working with it the past 3 months and have done lots of things with it, without any prior knowledge. I have a few question regarding the stability of my application. I have a synchronization application that connects to a service and send the results to SQL Server 2000. I got all my code in just one form.
3
1202
by: Keith Rebello | last post by:
I have an object called ColumnSection which represents a reinforced concrete column. This object contains an arraylist called Diagrams which contains Graph2D objects which are essentially X-Y plots. The Graph2D object has 2 public methods - Draw, which draws the plot on a bitmap in memory and DisplayGraph which blits the bitmap on to a Panel or PictureBox. I have a public ReadOnly property in the ColumnSection called...
13
15571
by: Pete | last post by:
I'm cross posting from mscom.webservices.general as I have received no answer there: There has been a number of recent posts requesting how to satisfactorily enable BASIC authorization at the HTTP level but as yet no fully useful answer. I too have been trying to call an apache/axis webservice which desires a username/password from my C# Client. (ie the equivalent of _call.setUsername("Myname") name from within a Java client proxy)...
0
1063
by: Betinho | last post by:
And after the installing of 2005 Beta 1, I got in problems because the GUI are not loadings and I can not use the program because the toolbox are not working eaither and the program hold still regarding loading some components. I went to the page of Microsoft regarding the order how to uninstall any beta or version of Visual Basic. I followed the process and it was looking very good and uninstalled the components. Now I can install any...
28
1998
by: philbo30 | last post by:
Simple question, I think: I have a known byte, "byte 1": 0000 0100 and a known portion of an unknown byte, "byte 2": bbbb 0100
1
1786
by: steve | last post by:
A series of articles examining some basic concepts in Sql Server. Basic Anatomy of Sql Server, part I What is a stored procedure? http://beyondsql.blogspot.com/2007/11/basic-anatomy-of-sql-server-part-i.html Basic Anatomy of Sql Server, part II The unit test as part of the database. http://beyondsql.blogspot.com/2007/11/basic-anatomy-of-sql-server-part-ii.html
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9601
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10635
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10115
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6881
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3861
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3013
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.