看板 Programming 關於我們 聯絡資訊
想請教一下各位。 目前我正在寫一個程式。目前要開發 XP 32,64 bit 程式。 目前在 64 bit 開發遇到底下這種問題。 我將 XP 32 bit程式直接拿到 XP 64bit。使用 Visual Studio 2005。設成 x64 環境。 結果都發生以下這類型態的問題。但在 Vista & Win 7 都能正常編譯。 請問有什麼設定可以設定? 或是我真的要一個一個解。 謝謝。 wchar_t chKey[100]; retCode = RegenumKeyEx(hKey, i, chKey, &dwSize, NULL, NULL, NULL, NULL); error C2664: 'RegenumKeyExA' : cannot convert parameter 3 from 'wchar_t [100]' to 'LPSTR' 1> Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ---------------------------------------------------------------------------------------------------------------------- Tchar const c_szAttachedTo[] = L"AttachedTo"; error C2440: 'initializing' : cannot convert from 'const wchar_t [11]' to 'const Tchar []' 1> There is no context in which this conversion is possible ---------------------------------------------------------------------------------------------------------------------- wchar_t szInfPath[100]; CString Infpath; wcscpy(szInfPath , Infpath); warning C4995: 'wcscpy': name was marked as #pragma deprecated 1>.\TestDlg.cpp(1140) : error C2664: 'wcscpy' : cannot convert parameter 2 from 'CString' to 'const wchar_t *' -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 122.146.103.174
adrianshum:應該和 32bit/64bit 無關. 是 UNICODE 61.238.156.189 03/08 19:33
adrianshum:和 MCBS 的問題 61.238.156.189 03/08 19:33
thomas2005:感謝。已經解決 60.244.105.125 03/09 11:16