CString Convert to LPCTSTR
i write DLL file,it is static dll
i want CString type Convert to LPCTSTR
but error
Code:
<<<<<<<<<<<Dll File>>>>>>>>>
<<<<<<<A.H>>>>>>>
class AFX_NOVTABLE dll
{
public:
__declspec(dllexport) LPCTSTR Fun();
};
<<<<<<<A.Cpp>>>>>>
LPCTSTR dll::Fun()
{
CString Rxg=_T("rxg");
LPCTSTR lpszStr=Rxg.GetBuffer();
return lpszStr;
}
<<<<<<<<Exe>>>>>>>>>
#pragma comment(lib,"dll.lib")
#include "A.h"
..................
dll d;
LPCTSTR b=d.Fun();
error,why
thank:)