Solved

DLL Programming

Posted on 2001-06-05
8
216 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
Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
C++ get user from AD  (VS6) 7 82
How to split this in C++ 4 106
C++ :Change value from  DisableCMD registry 4 65
How do i run a c++ file? 15 46
Often, when implementing a feature, you won't know how certain events should be handled at the point where they occur and you'd rather defer to the user of your function or class. For example, a XML parser will extract a tag from the source code, wh…
Basic understanding on "OO- Object Orientation" is needed for designing a logical solution to solve a problem. Basic OOAD is a prerequisite for a coder to ensure that they follow the basic design of OO. This would help developers to understand the b…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

789 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