Solved

DLL Programming

Posted on 2001-06-05
8
227 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

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.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Dynamically allocate memory 9 76
C++ error cannot convert from std::string to const char * 6 372
Need some help with design 17 48
using interface in TLB 3 31
When writing generic code, using template meta-programming techniques, it is sometimes useful to know if a type is convertible to another type. A good example of when this might be is if you are writing diagnostic instrumentation for code to generat…
Many modern programming languages support the concept of a property -- a class member that combines characteristics of both a data member and a method.  These are sometimes called "smart fields" because you can add logic that is applied automaticall…
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.
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.

751 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