• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 181
  • Last Modified:

creating a dll

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
1 Solution
you cant create on from VB - have you got a C compiler or delphi?

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

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....

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now