Solved

DLL Programming

Posted on 2001-06-05
8
209 Views
Last Modified: 2010-04-02
What does the EXPORT command do and can anyone refer me to a place where I can find help on DLL programming?  
0
Comment
Question by:kamanuci
8 Comments
 
LVL 22

Expert Comment

by:nietod
ID: 6157384
>> What does the EXPORT command do
C++ has no EXPORT command.

In windows, you can have an EXPORTS directive in your module defintion file (.DEF).  Is that what you are asking about?

In Many windows compilers, like VC and BCB you can use __declspec(dllexport) to export functions/data from a DLL/EXE.  Is that what you are asking about?

>> where I can find help on DLL programming?
This is one of the best places.
0
 
LVL 5

Expert Comment

by:robpitt
ID: 6157882
Some might say that the "Windows Programming" topic area would be a better place. :-)

Seriously though there is absolutely loads of stuff of the net about DLL programming. Just try a search engine with something like "DLL DllMain C++ example sample" etc.

Rob
0
 
LVL 2

Accepted Solution

by:
MadYugoslav earned 50 total points
ID: 6158890
if this is Visual C/C++.
There is page from MSDN:
========================
Syntax
EXPORTS definitions

This statement makes one or more definitions available as exports to other programs.

EXPORTS marks the beginning of a list of export definitions. Each definition must be on a separate line. The EXPORTS keyword can be on the same line as the first definition or on a preceding line. The .DEF file can contain one or more EXPORTS statements.

The syntax for an export definition is:

entryname[=internalname] [@ordinal[NONAME]] [DATA] [PRIVATE]

The optional keyword PRIVATE prevents entryname from being placed in the import library generated by LINK. It has no effect on the export in the image also generated by LINK.

There are three methods for exporting a definition, listed in recommended order of use:

The __declspec(dllexport) keyword in the source code


An EXPORTS statement in a .DEF file


An /EXPORT specification in a LINK command
All three methods can be used in the same program. When LINK builds a program that contains exports, it also creates an import library, unless an .EXP file is used in the build.
0
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 
LVL 22

Expert Comment

by:nietod
ID: 6159906
We don't know that this has anyting to do with VC, module definition files or even Windows  (Other OSs do have DLLs).   plus the question is asking about "EXPORT" not "EXPORTS", which might or might not be a typo.  So your answer might not be applicable.
0
 
LVL 2

Expert Comment

by:MadYugoslav
ID: 6162795
To nietod !
It seems to be the question for Windows and VC. If it isn't I'll get rejected answer and no points from kamanuci.
Please post a comment with other OS's which sustain DLL.
0
 
LVL 22

Expert Comment

by:nietod
ID: 6163241
Unix
0
 

Author Comment

by:kamanuci
ID: 6165678
Thank you for all your help for both MadYugoslav and Neitod.  Sorry for the confusion with the question.  I should have specified the environment and I apolize.
0
 
LVL 2

Expert Comment

by:MadYugoslav
ID: 6166581
Thanks to kamanuci for being accepted my answer. Also thanks to nietod for comments (what help me to make my knowledge bigger and better).
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

785 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