Skip to main content
Email Password   helpLost your password?

Introduction

This article shows a step-by-step technique to create your first DLL with VC++.

Steps to Create Your First DLL

Some Things to Note

The DLL file may not be visible due to the File View options in the Windows folder. So, you can either go to the DOS prompt and copy the file or enable the setting "Show all files" in Windows Explorer to copy the file. To create a DLL that uses MFC, see the following example. Note that extern "C" has not been used and the macro AFX_MANAGE_STATE(AfxGetStaticModuleState()); has been used to implement MFC.

 _declspec(dllexport)CString Display(CString a,CString b)
{
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    CString Str;
    Str = a + b;
    return Str;
}

That's all, folks. All luck and have a great time.

You must Sign In to use this message board.
 
 
Per page   
 FirstPrevNext
GeneralHow can i create a same type of dll in vb6? Pin
JothiMurugeswaran
19:19 13 Nov '07  
Questionbuilding dll (C++) to be called by C applications Pin
P.Luke
14:33 20 Apr '07  
GeneralDll-ASP.NET Pin
1:10 23 Feb '07  
GeneralMessages Pin
Gipico
4:32 27 Oct '06  
GeneralC DLL without changing the source code Pin
saflitzk
11:47 8 Mar '05  
Generalproblem with dll Pin
dnqhung
2:24 10 Jun '04  
GeneralRe: problem with dll Pin
Christian Kluin
12:31 14 Jun '04  
GeneralError C1083 in VC++ .NET 2002 Pin
Scott H. Chang
8:07 8 Mar '04  
GeneralRe: Error C1083 in VC++ .NET 2002 Pin
Sachin R Sangoi
3:06 11 Jan '07  
Generalhow to export vb function through c++ dll Pin
sailu
21:45 22 Aug '02  
Generaldll compilation error Pin
MINAKANNAN
21:30 22 Jul '02  
GeneralRe: dll compilation error Pin
Anonymous
11:05 11 Mar '03  
GeneralRe: dll compilation error Pin
Anonymous
1:43 25 Aug '04  
GeneralRe: dll compilation error Pin
sivo
21:09 6 Apr '03  
GeneralRe: dll compilation error Pin
DaFrawg
3:08 30 Jan '04  
GeneralRe: dll compilation error Pin
sivo
21:09 6 Apr '03  


Last Updated 28 Jun 2002 | Advertise | Privacy | Terms of Use | Copyright © CodeProject, 1999-2009