What is the different between dll and Api?

Stalker

Member
Oct 9, 1999
193
0
0
i need it in simple english. What i found give more headache to me. :(

ActiveX control :An insertable COM object (component) that usually provides user interface components and can fire events. ActiveX controls are lightweight versions of OLE Controls (.OCXs)

API :An abbreviation for application program interface. Generically, a method by which a program can obtain access to or modify the operating system. See also DLL

DLL :An abbreviation for dynamic link library, a file containing a collection of Windows functions designed to perform a specific class of operations. Most DLLs carry the .DLL extension, but some Windows DLLs, such as Gdi32.exe, use the .EXE extension. Functions within DLLs are called (invoked) by applications as necessary to perform the desired operation.

Btw, i am a java programmer but have limited exposure on these thing.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
a programmer?

API = abstract representation.
DLL = physical file.

different faces of the same thing, when it comes to the core win32 stuff.

ActiveX = The very stupid idea created by MS to try to make their browser sexy to developers. See also: Why Internet Explorer Sucks.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: drag
ActiveX = The very stupid idea created by MS to try to make their browser sexy to developers. See also: Why Internet Explorer Sucks.

ActiveX is not just an IE thing. It is a paradigm (design? methodology? specification?) for allowing COM-based programs to interoperate. It was used in IE for things like plug-ins (Flash, QuickTime, etc.), but the security restrictions around it were not very thoroughly thought out, and as a result we have spyware and all kinds of other nasty problems in IE.

ActiveX itself is not a "stupid idea," just a poorly implemented one when it comes to Internet Explorer.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Well if it doesn't work it doesn't, doesn't it?

It may have seen a good idea at the time, but would you of done the same thing second time through?

I know I've had a lot of ideas that were perfectly logical and though out. Anybody else would of thought it was good, too. But yet they turn out to be very stupid ideas.

If a guy sells you a apple tree and in a few months it grows peaches, then it's probably not a apple tree, right?

Maybe ActiveX for the OS itself wasn't bad, but the part used for IE was certianly a be very very bad choice. Plus I don't remember downloading and installing ActiveX plugin like I did with Java or Flash. But it's been a long time.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
API is a documented set of functions for a piece of software that other software programs can call to interact with it. In Java, if you develop an Object with a set of five public functions, those functions and their corresponding documentation represent your Object's API. Other programmers can use those methods to interact with your Object.

DLLs are usually Windows executables that are "registered" within the Windows registry. The DLLs have their own API (set of public functions) that can be called by any other Windows program. Each DLL has a unique "prog id" that other programs can identify it with. This allows me to write a Windows program that can create objects knowing only the prog id. For instance, I can create a Microsoft XML DOM object by creating a class of type "MSXML2.DOMDocument". As long as a Microsoft XML DLL is registered on the system I am running on, my program will use the DLL to create the correct object.

DLLs are great for reusing code, but their biggest problem is versioning. Imagine if I write a program that is based on version 2 of a particular shared DLL. Another program is installed that updates that shared DLL to a new version (3). If the version 3 doesn't work exactly like version 2, my program will now break. Unfortunately, there's no good consistent way for me to verify that the DLL I am invoking is the version I am expecting. This is known as "DLL hell", and it's one of the issues that Microsoft addressed in the .NET framework.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: drag
Well if it doesn't work it doesn't, doesn't it?

It may have seen a good idea at the time, but would you of done the same thing second time through?

I know I've had a lot of ideas that were perfectly logical and though out. Anybody else would of thought it was good, too. But yet they turn out to be very stupid ideas.

If a guy sells you a apple tree and in a few months it grows peaches, then it's probably not a apple tree, right?

Maybe ActiveX for the OS itself wasn't bad, but the part used for IE was certianly a be very very bad choice. Plus I don't remember downloading and installing ActiveX plugin like I did with Java or Flash. But it's been a long time.

You're absolutely right. My only point was that the term "ActiveX" only seems to get thrown around when discussing ActiveX browser controls. You've probably used a number of programs that install ActiveX DLLs on your system, you just don't realize it (the term isn't used very often for thick client apps).
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: MrChad
Originally posted by: drag
Well if it doesn't work it doesn't, doesn't it?

It may have seen a good idea at the time, but would you of done the same thing second time through?

I know I've had a lot of ideas that were perfectly logical and though out. Anybody else would of thought it was good, too. But yet they turn out to be very stupid ideas.

If a guy sells you a apple tree and in a few months it grows peaches, then it's probably not a apple tree, right?

Maybe ActiveX for the OS itself wasn't bad, but the part used for IE was certianly a be very very bad choice. Plus I don't remember downloading and installing ActiveX plugin like I did with Java or Flash. But it's been a long time.

You're absolutely right. My only point was that the term "ActiveX" only seems to get thrown around when discussing ActiveX browser controls. You've probably used a number of programs that install ActiveX DLLs on your system, you just don't realize it (the term isn't used very often for thick client apps).

Hehe, I'd bet quite a bit that your wrong on that account. :p But I understand what your saying.
 

MrChad

Lifer
Aug 22, 2001
13,507
3
81
Originally posted by: drag
Hehe, I'd bet quite a bit that your wrong on that account. :p But I understand what your saying.

Oh, that's right. You're one of those "Linux people." :p:D
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: amdfanboy
Originally posted by: MrChad
Originally posted by: drag
Hehe, I'd bet quite a bit that your wrong on that account. :p But I understand what your saying.

Oh, that's right. You're one of those "Linux people." :p:D

/me grins


Don't worry we both have our "crosses" to bear. You with IE and ActiveX, and me with X Window. Who you suppose carries a heavier weight? :p
 

AFB

Lifer
Jan 10, 2004
10,718
3
0
Originally posted by: drag
Originally posted by: amdfanboy
Originally posted by: MrChad
Originally posted by: drag
Hehe, I'd bet quite a bit that your wrong on that account. :p But I understand what your saying.

Oh, that's right. You're one of those "Linux people." :p:D

/me grins


Don't worry we both have our "crosses" to bear. You with IE and ActiveX, and me with X Window. Who you suppose carries a heavier weight? :p

:p

:D:D

I will switch the day OSX comes to X86.
 

dighn

Lifer
Aug 12, 2001
22,820
4
81
DLL = dynamic link library. basically executable files that do not run by themselves but rather export functions for other programs to use. they do NOT have to be registered in the registry. only COM DLLs have to be registered.

activex is a standard for reusing components. it's based on OLE, which is based on COM and can be hosted in DLL files.

COM = component object model = a standard for reusing binary code in an object oriented way
 

BFG10K

Lifer
Aug 14, 2000
22,709
3,003
126
ActiveX = The very stupid idea created by MS to try to make their browser sexy to developers.
ActiveX is a stripped down version of COM created for fast browsing speed and I can't see any reason why other browsers can't use it.

If OTOH the platform doesn't have COM then that's a platform issue.