Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Export Class from DLL to EXE

Status
Not open for further replies.

Skute

Programmer
Jul 21, 2003
272
GB
Hi,

how can i create a class in a DLL and then use it in an EXE?

Im just using Win32 - no managed, no MFC.

Cheers



Skute

"There are 10 types of people in this World, those that understand binary, and those that don't!"
 
class __declspec(dllexport) class{implement}; in the dll
and

class __declspec(dllimport) class{declarations}; in the .exe

Ion Filipski
1c.bmp
 
what do you mean by declarations in the exe?

ie have a define section in a common header file such as:

#ifdef EXE_EXPORT
#define EXE_API __declspec (dllexport)
#else
#define EXE_API __declspec (dllimport)
#endif

class EXE_API MyClass
{
public:
MyClass();

private:
int iTest;
}

?


Skute

"There are 10 types of people in this World, those that understand binary, and those that don't!"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top