Solved

dynamic link library (DLL)

Posted on 1998-11-26
1
307 Views
Last Modified: 2010-04-01
how do i create my own dynamic link library (DLL) in C , so that i can use it in my program which is written using Ms VB 5. If possible where can i get an example or tips about the title.
0
Comment
Question by:tag_net
1 Comment
 
LVL 86

Accepted Solution

by:
jkr earned 10 total points
ID: 1178702
That's quite easy:
Declare each function that you want to use in VB as (e.g.)
extern "C" int ___declspec( dllexport) MyFunction ( int i);
In VB, use
Declare Function _MyFunction lib "mydll.dll" (inp As integer) As integer
(NOTE the '_' before MyFunction - most C linkers prepend the functions' names with it if you don't suppress this explicitly)

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
simple way to manipulate chinese characters in non unicode mfc c++ application. 9 145
Writing a parser for java language 4 71
Dialogbox API leak? 18 81
Unable to start eclipse ? 17 133
Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to user default arguments when defining functions. This method of defining functions will be contrasted with the non-default-argument of defining functions.

895 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now