Solved

DLL Programming

Posted on 2001-06-05
8
193 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
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.

705 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

16 Experts available now in Live!

Get 1:1 Help Now