954,496 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article
rxgmoral
Newbie Poster
14 posts since Jul 2006
Reputation Points: 21
Solved Threads: 0
 

Look up c_str() function.

Grunt
Junior Poster
152 posts since Jul 2006
Reputation Points: 197
Solved Threads: 12
 

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
Team Colleague
30,049 posts since Aug 2005
Reputation Points: 5,662
Solved Threads: 2,343
 

thank you:)

rxgmoral
Newbie Poster
14 posts since Jul 2006
Reputation Points: 21
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You