Your full service technology partner! 
-Collapse +Expand
Search Delphi Group:

-Collapse +Expand Delphi To/From
-Collapse +Expand Delphi Store

Prestwood eMagazine

October Edition
Subscribe now! It's Free!
Enter your email:

   ► KBProgrammingDelphi for W...Using Data   Print This     
  From the September 2009 Issue of Prestwood eMag
Delphi Using Data:
Using DotNet DLLs in Delphi Win32 Apps FAQ
Posted 15 years ago on 7/28/2006 and updated 12/13/2006
Take Away: Using DotNet DLLs in Win32 and using Win32 DLLs in DotNet. When. Why. How.


Q. Can I use a DotNet DLL in a Win32 App? Vice versa?
A. Yes you can but before you proceed, discuss the following points with your fellow developers:
  1. A DotNet DLL is not the same as a Win32 DLL. It is not always easy to directly use a Win32 DLL in a DotNet app and you cannot directly use a DotNet DLL in a Win32 application.
  2. In general, you don't want to mix Win32 and DotNet code in a commercial application. You can, but my professional opinion is that you shouldn't even try. You should target either Win32 or the DotNet framework but don't mix both in the same application. There are exceptions and you should discuss these with your Delphi developer.
  3. In general, it is more acceptable to use a Win32 DLL in a DotNet application then it is to use a DotNet DLL in a Win32 application. The reason for this is that when you add a DotNet DLL to your application you are now requiring the user to install the particular version of the DotNet framework or higher to use your app (additional requirements are not good). Currently, there are four versions of the DotNet framework 1.0, 1.1, 1.1a, and 2.0. This, of course, will change once Windows moves to a fully DotNet API in Windows Vista.
  4. It is easier to use a Win32 DLL in a DotNet application then it is to use a DotNet DLL in a Win32 application. It usually only takes a few hours to integrate a simple Win32 DLL so that should be a part of the discussion.

Q. Can I use a DotNet DLL, say written in C# or VB.Net, as a visual control in a Win32 Delphi program, say Delphi 5, 6, or 7?

A. Yes, through COM Interop. A good place to start is the following MSDN topic: "Exposing .NET Framework Components to COM":


Share a thought or comment...
Write a Comment...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.

Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1274A1
Enter key:
KB Post Contributed By Mike Prestwood:

Mike Prestwood is a drummer, an author, and creator of the PrestwoodBoards online community. He is the President & CEO of Prestwood IT Solutions. Prestwood IT provides Coding, Website, and Computer Tech services. Mike has authored 6 computer books and over 1,200 articles. As a drummer, he maintains and has authored 3 drum books. If you have a project you wish to discuss with Mike, you can send him a private message through his PrestwoodBoards home page or call him 9AM to 4PM PST at 916-726-5675 x205.

Visit Profile

 KB Article #100396 Counter
Since 4/2/2008
Sales Website: Or visit our legacy sales site:

©1995-2021 Prestwood IT Solutions.   [Security & Privacy]