Click here to Skip to main content
16,011,626 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BIOS Time Pin
Tomasz Sowinski5-Jun-02 3:41
Tomasz Sowinski5-Jun-02 3:41 
GeneralRe: BIOS Time Pin
dazinith5-Jun-02 3:46
dazinith5-Jun-02 3:46 
GeneralRe: BIOS Time Pin
SamirSood5-Jun-02 5:25
SamirSood5-Jun-02 5:25 
GeneralRe: BIOS Time Pin
Rage5-Jun-02 5:33
professionalRage5-Jun-02 5:33 
GeneralRe: BIOS Time Pin
John M. Drescher6-Jun-02 10:14
John M. Drescher6-Jun-02 10:14 
GeneralRe: BIOS Time Pin
Mike Nordell5-Jun-02 3:53
Mike Nordell5-Jun-02 3:53 
Generalclasses,dlls and class wizard Pin
5-Jun-02 1:08
suss5-Jun-02 1:08 
GeneralRe: classes,dlls and class wizard Pin
Tomasz Sowinski5-Jun-02 1:16
Tomasz Sowinski5-Jun-02 1:16 
To export classes from .dll, you need to mark them as __declspec(dllexport). To import, you'll need __declspec(dllimport). Since the specifiers go to .h files, you'll need a way to mark them as exported when compiling .dll, and imported when using .dll in other project. This can be easily done with preprocessor:

#if BUILDING_MY_DLL
#define EXPORTED __declspec(dllexport)
#else
#define EXPORTED __declspec(dllimport)
#endif

class EXPORTED MyClass
{
//...
};


I'm usually inserting #if/#endif stuff in special .h file included before any exported class declaration.

BUILDING_MY_DLL should be defined in Project Settings, C++ category, Preprocessor section. Of course, it cannot be defined when you're just using .dll in other project.


Brendan O`Connor wrote:
Lastly,does mixing STL and MFC cause any exceptions?Is it good to mix them?

You can mix them. Is it good? It depends who you'll ask. If it works for you, go with it.


Tomasz Sowinski -- http://www.shooltz.com

- It's for protection
- Protection from what? Zee Germans?

GeneralRe: classes,dlls and class wizard Pin
James R. Twine5-Jun-02 4:53
James R. Twine5-Jun-02 4:53 
GeneralRe: classes,dlls and class wizard Pin
Tomasz Sowinski5-Jun-02 4:52
Tomasz Sowinski5-Jun-02 4:52 
GeneralRe: classes,dlls and class wizard Pin
James R. Twine5-Jun-02 5:21
James R. Twine5-Jun-02 5:21 
GeneralRe: classes,dlls and class wizard Pin
James R. Twine6-Jun-02 18:43
James R. Twine6-Jun-02 18:43 
GeneralRe: classes,dlls and class wizard Pin
Tomasz Sowinski6-Jun-02 23:50
Tomasz Sowinski6-Jun-02 23:50 
GeneralDAO and Visual Studio .NET Pin
5-Jun-02 1:02
suss5-Jun-02 1:02 
GeneralBMP 24 bit to 1 bit Pin
Nish Nishant5-Jun-02 0:46
sitebuilderNish Nishant5-Jun-02 0:46 
GeneralRe: BMP 24 bit to 1 bit Pin
Tomasz Sowinski5-Jun-02 1:06
Tomasz Sowinski5-Jun-02 1:06 
GeneralRe: BMP 24 bit to 1 bit Pin
Nish Nishant5-Jun-02 1:14
sitebuilderNish Nishant5-Jun-02 1:14 
GeneralRe: BMP 24 bit to 1 bit Pin
Tomasz Sowinski5-Jun-02 1:18
Tomasz Sowinski5-Jun-02 1:18 
GeneralRe: BMP 24 bit to 1 bit Pin
Nish Nishant5-Jun-02 1:29
sitebuilderNish Nishant5-Jun-02 1:29 
GeneralRe: BMP 24 bit to 1 bit Pin
Tomasz Sowinski5-Jun-02 1:34
Tomasz Sowinski5-Jun-02 1:34 
GeneralRe: BMP 24 bit to 1 bit Pin
Tim Smith5-Jun-02 1:37
Tim Smith5-Jun-02 1:37 
GeneralProblem with MicrosoftAccessDriver Pin
4-Jun-02 23:53
suss4-Jun-02 23:53 
GeneralRe: Problem with MicrosoftAccessDriver Pin
Ed Gadziemski5-Jun-02 14:13
professionalEd Gadziemski5-Jun-02 14:13 
GeneralVisC++ and installShield Pin
Tali4-Jun-02 23:20
Tali4-Jun-02 23:20 
GeneralRe: VisC++ and installShield Pin
Ed Gadziemski5-Jun-02 14:17
professionalEd Gadziemski5-Jun-02 14:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.