在ATL Dll中
STDMETHODIMP CMYATLDLL::GetCurTime(BSTR *bstrTime)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState()) // TODO: Add your implementation code here
*bstrTime = CTime::GetCurrentTime().Format("%Y/%m/%d").AllocSysString();
return S_OK;
}在VC客戶端用:
CString str = "";
str +=pMyAtlDll->GetCurTime();
AfxMessageBox(str);在Win 98 和Win 2000下面都沒有問題,請問爲什麽到了Win XP下面就MessageBox 出來"???????????????????" 呢?請指教,應該要注意些什麽,如何解決?!