- Exe has only one main entry point (it contains a startup function etc).
- Exe is an out of process server, when the system launches new exe, a new process is created.
- When exe is lanuched, it occupised its own memory space.
- The exe’s entry thread is called in context of main thread of that process.
- The exe can process requests on an independent thread of execution, notifying the client of task completion using events or asynchronous call-backs. This frees the client to respond to the user.
- If an error occurs the client processes can continue to operate.
- Generally slower than an Dll alternative.
- A Dll runs is an in process server running in the same memory space as the client process.
- DLLs are loaded into an exe application (a Dll can't run by itlsef). If tried to run it directly , it will display an error about a missing entry point.
- In-process component shares its client’s address space, so property and method calls don’t have to be marshaled. This results in much faster performance.
- If an unhandled error occurs it will cause the client process to stop operating.
- That in most cases DLLs have an export section where symbols are exported.
- DLL can be reused and versioned. It reduces storage space as different programs/files can use the same dll.
- DLL does not have a main entry point. Binding occurs at runtime, that’s why it is called "Dynamic Link" library.
- The system loads a DLL into the context of an existing thread.
- An OCX is used where a visual interface is required for the function , and in the 3rd party controls you use.
- Ocx's are interfaces that you can place on a form. Like a textbox or a picturebox.
- Very often, you could think of an OCX as an extension of the VB IDE controls.
- They need to be driven by the form's thread and can not exist without a parent form.
- An OCX is a file that can hold one or more ActiveX controls. These files do not need to have the .ocx extension (some are .dll files) and thus should not be referred to as "OCXs".