try this
LPCTSTR lpszStr=(LPCTSTR)Rxg;
>>LPCTSTR b=d.Fun();
post the complete error message, I don't think you exported/imported the function correctly. This is a macro I use. When compiling the DLL, define the macro MYEXPORT, when compiling the application then do not define it.
#ifdef MYEXPORT
#define DllExport __declspec( dllexport )
#else
#define DllExport __declspec( dllimport )
#endif
class AFX_NOVTABLE dll
{
public:
DllExport LPCTSTR Fun();
};
Ancient Dragon
Retired & Loving It
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343