Solved

DLL Programming

Posted on 2001-06-05
8
202 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
 
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
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.

 
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

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

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…
  Included as part of the C++ Standard Template Library (STL) is a collection of generic containers. Each of these containers serves a different purpose and has different pros and cons. It is often difficult to decide which container to use and …
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 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.

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

14 Experts available now in Live!

Get 1:1 Help Now