Exporting in a DLL
-
Hi all, Ok, this might be a stupid question but, here goes: Lets say you have a class in your DLL. And this class has a couple of functions that will be exported. Is it nessacery to export the class? I.E.
#ifdef UTILITY_EXPORTS #define UTILITY_API __declspec(dllexport) #else #define UTILITY_API __declspec(dllimport) #endif class UTILITY_API test { public: int function1(); };
DEF File:
LIBRARY Utility
DESCRIPTION "Export Some Symbols."
EXPORTS
test @1
function1 @2Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
-
Hi all, Ok, this might be a stupid question but, here goes: Lets say you have a class in your DLL. And this class has a couple of functions that will be exported. Is it nessacery to export the class? I.E.
#ifdef UTILITY_EXPORTS #define UTILITY_API __declspec(dllexport) #else #define UTILITY_API __declspec(dllimport) #endif class UTILITY_API test { public: int function1(); };
DEF File:
LIBRARY Utility
DESCRIPTION "Export Some Symbols."
EXPORTS
test @1
function1 @2Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
you need to export that class, not its functions.
Prasad Notifier using ATL
-
you need to export that class, not its functions.
Prasad Notifier using ATL
Thanx for reply.. And one would be able to refernce those functions then, when exporting just the class?
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
-
Thanx for reply.. And one would be able to refernce those functions then, when exporting just the class?
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
have you only tried ? yes, when you export a class, you export everything within the class
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
-
Hi all, Ok, this might be a stupid question but, here goes: Lets say you have a class in your DLL. And this class has a couple of functions that will be exported. Is it nessacery to export the class? I.E.
#ifdef UTILITY_EXPORTS #define UTILITY_API __declspec(dllexport) #else #define UTILITY_API __declspec(dllimport) #endif class UTILITY_API test { public: int function1(); };
DEF File:
LIBRARY Utility
DESCRIPTION "Export Some Symbols."
EXPORTS
test @1
function1 @2Thanx in advance
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
Hi, > Lets say you have a class in your DLL. And this class has a couple of functions that will be exported. Is it nessacery to export the class? To export a class from a dll is only possible from MFC-Class-DLL to MFC-Application. (or Microsoft Specific) To export a class isn't C++ standard. HTH Frank
-
have you only tried ? yes, when you export a class, you export everything within the class
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
No, I haven't tried ! ... But thank you for the help. But now that I know what to do, I'll try. :)
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
-
Hi, > Lets say you have a class in your DLL. And this class has a couple of functions that will be exported. Is it nessacery to export the class? To export a class from a dll is only possible from MFC-Class-DLL to MFC-Application. (or Microsoft Specific) To export a class isn't C++ standard. HTH Frank
Thanx for the reply ... I'll keep that in mind.
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r
-
Hi, > Lets say you have a class in your DLL. And this class has a couple of functions that will be exported. Is it nessacery to export the class? To export a class from a dll is only possible from MFC-Class-DLL to MFC-Application. (or Microsoft Specific) To export a class isn't C++ standard. HTH Frank
Frank K wrote:
To export a class from a dll is only possible from MFC-Class-DLL to MFC-Application.
Wrong. You can export a class from any type of DLL. Whether you can use that class or not, depends entirely on the compiler/linker you use to link to the DLL.
-- Mit viel Oktan und frei von Blei, eine Kraftstoff wie Benziiiiiiin!
-
Frank K wrote:
To export a class from a dll is only possible from MFC-Class-DLL to MFC-Application.
Wrong. You can export a class from any type of DLL. Whether you can use that class or not, depends entirely on the compiler/linker you use to link to the DLL.
-- Mit viel Oktan und frei von Blei, eine Kraftstoff wie Benziiiiiiin!
Thanx Jörgen Sigvardsson, for clearing that one up.... :)
The only programmers that are better than C programmers are those who code in 1's and 0's..... :) :) Programm3r