Security and Privacy on the U3 Platform

Be Smart with U3

DLL Conventions: Issues and Solutions

As a developer we often find ourselves surrounded by problems that actually have nothing to do with our productivity or even the project we’re working on. One of them is the issue of compatibility between the Dynamic Link Libraries developed using different tools. Recently, while working on a project, I faced this problem, and in this article I’d like to present my analysis. We’ll also talk about writing DLLs that are easy for us develop and don’t cause others to face similar problems when they try to use them.
I assume that you’re familiar with using Microsoft Visual C++ and Borland C++ Builder, because these are the tools I’ll use to expose the nature of problem and the solution.What is the need to do so anyway?
Some people may argue that they can’t imagine why someone would ever need to use DLLs written using one tool in some different tool. An elegant solution would be to have a special build of the DLL for every other tool that can consume the DLL; but, like many other people, I don’t find it appealing. Moreover, there are circumstances where you’re bound to work on these issues, such as:
-You do not have the source to the DLL, or even the import library. Don’t know what an import library is? Don’t worry; we’ll talk about that shortly.
-You have existing applications to maintain and, to add a specific feature, you company has purchased a library. The source is, of course, not available, and you still need to figure out how to call the function when linker gives up saying there are unresolved externs.
I can add more to this list but I believe the above two points give you the idea. So let’s see what the problem is, apart from understanding the terminology used in the context and finding a working solution for all of these problems. What I explain here will be specific to the tools I’ve been using, but I’m sure problems related to other tools won’t be much different.
Advertisements

January 29, 2007 - Posted by | Uncategorized

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: