请问高手?为何我的DLL函数返回的是乱七八糟的字符
extern "C" _declspec(dllexport) LPCSTR GetId()
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());
unsigned long s1,s2;
CString strCpuId1,strCpuId2;
__asm
{
mov eax,01h
xor edx,edx
cpuid
mov s1,edx
mov s2,eax
}
strCpuId1.Format("%08X\n%08X-",s1,s2);
__asm
{
mov eax,03h
xor ecx,ecx
xor edx,edx
cpuid
mov s1,edx
mov s2,ecx
}
strCpuId2.Format("%08X\n%08X-",s1,s2);
return (LPCSTR)(strCpuId1+strCpuId2);//这里的变量正常
}
在程序中调用后返回的是乱字符
why?...