Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17


creating a dll

Posted on 1999-06-29
Medium Priority
Last Modified: 2013-11-20
I wanted to create a dll containing a function to be used for my program in Visual Basic.  The problem is i do not know how to create a dll.  Please give me the steps in creating a dll, and if possible, a sample program.  Thanx
Question by:chumchum
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Expert Comment

ID: 1308375
you cant create on from VB - have you got a C compiler or delphi?

if you have Visual C++ just use the Application Wizard.


Accepted Solution

kdkd earned 400 total points
ID: 1308376
Use Visual C++... but programm in c(!)...programming in c++ will lead to many unwanted problems
first start a new project "Win32 Dll"...
include a file main.c
start writing your function
write a prototype for your functions
__declspec(dllexport) _stdcall int test (int)
int test(int a)

just compile it....

try another c++ project to test it...
include the created .lib file in Project settings\link...
declare the imported function as followed
extern "C" {
__declspec(dllimport) _stdcall int test(int)

use it....


Featured Post

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
If you use Adobe Reader X it is possible you can't open OLE PDF documents in the standard. The reason is the 'save box mode' in adobe reader X. Many people think the protected Mode of adobe reader x is only to stop the write access. But this fe…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…

704 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question