Solved

DLLs

Posted on 1998-08-06
2
255 Views
Last Modified: 2010-04-02
How can we export an entire C++ class from a DLL. This can be done easily if we are using a a MFC dll but we do not want to extend an MFC dll. I suppose it can be done using
--declspec(dllexport) but then can this be used to export an entire class.
Please Help.
0
Comment
Question by:shayad
[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
2 Comments
 
LVL 5

Accepted Solution

by:
tuvi earned 50 total points
ID: 1169579
#define DllExport    __declspec( dllexport )

class DllExport C
{
  // ... your class definition
};

Samething applies for import.
0
 

Author Comment

by:shayad
ID: 1169580
The example is a bit too short. It would have been great if the example was continued to incorporate 'import' too.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
  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 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.

734 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