visual-c++-6

VC++6 error C2059: syntax error : 'constant'

若如初见. 提交于 2019-12-19 10:00:30
问题 Made this simple class with MSVC++ 6.0 class Strg { public: Strg(int max); private: int _max; }; Strg::Strg(int max) { _max=max; } Sounds good if I use it in : main() { Strg mvar(10); } But Now If I use it in an another class : class ok { public: Strg v(45); }; I get message error : error C2059: syntax error : 'constant' Could you tell me more please ? 回答1: Should be: class ok { public: Strg v; ok() : v(45) {} }; Non-static member variables that don't have default constructors (v in this case

Running Visual Studio 6 C++ in Windows 8.1

爱⌒轻易说出口 提交于 2019-12-18 12:29:52
问题 I recently migrated my system to windows 8.1. Unfortunatly like some others, I am not able to start Visual Studio 6 anymore. The software is crashing at startup (splash screen). I know there are some workaround, to be able to compile with vc6 in newer IDEs, but this is not working for me, since I have to compile a huge number of project and I cannot afford of modifying all the project files 1 by 1... I already see the answer coming: that vc6 is so old, and not supported and so on... I am

Visual Studio 2010 64-bit COM Interop Issue

依然范特西╮ 提交于 2019-12-18 11:48:03
问题 I am trying to add a VC6 COM DLL to our VS2010RC C# solution. The DLL was compiled with the VC6 tools to create an x86 version and was compiled with the VC7 Cross-platform tools to generate a VC7 DLL. The x86 version of the assembly works fine as long as the consuming C# project's platform is set to x86. It doesn't matter whether the x64 or the x86 version of the DLL is actually registered. It works with both. If the platform is set to 'Any CPU' I receive a BadImageFormatException on the load

What's the latest version of Boost compatible with VC++6?

北慕城南 提交于 2019-12-17 18:38:01
问题 What is the latest version of the Boost library that is compatible with Microsoft Visual C++ 6? And can you provide a link to download it directly? The Downloads link at http://www.boost.org only gives a download for version 1.36.0, and the documentation for that version lists Visual C++ 7.1 as the lowest version of Microsoft compiler tested. Do they purge out downloads for older versions? 回答1: Boost 1.34.1 has been tested with vc6. The old versions are still available. 回答2: You can get all

Bad pointer or link issue when creating wstring from vc6 dll

Deadly 提交于 2019-12-14 03:08:39
问题 I got a DLL generated on VC6 and using wstring , and I'm trying to use it in a VC9 project. In this DLL there is a higher level class manipulating wstring , called UtfString . I got everything imported correctly in my project, but when I call: std::wstring test; UtfString uTest(test); it won't link, even if the function prototype is in the lib... The other issuer is that when create a new UtfString, and debug my app, the new pointer is <Bad Ptr> . I suspect a conflict between VC6 wstring and

How to debug COM object in Visual Studio 6.0 that is created in an ASP page?

丶灬走出姿态 提交于 2019-12-14 02:23:08
问题 I have an old C++ COM component which has to stay in Visual Studio 6.0 format. I can't for the life of me figure out how to debug the code in the actual COM component. I'm able to build it in debug mode, add breakpoints and attach it to the dllhost.exe process, but the Visual Studio environment will only show me the disassembly from dllhost.exe and not my source code (It also doesn't stop on the breakpoints). I remember a while ago there was a way to make IIS (or inetinfo.exe) the target of

Window creation failed - LoadFrame(IDR_MAINFRAME) Fails C++

孤者浪人 提交于 2019-12-13 20:59:57
问题 I'm in the middle of upgrading some windows applications (Legacy Code) from VC 6 to VS2010. Most of the applications compiled and would run after cleaning up expected conversion errors, but I'm having a lot of trouble with this. Here is where LoadFrame() fails and the application exits. The error returned here is 0. CMainFrame* pMainFrame = new CMainFrame;// Create main MDI Frame window if (!pMainFrame->LoadFrame(IDR_MAINFRAME)) DWORD err = GetLastError(); return FALSE; Here is the LoadFrame(

Pre-setting locations for looking for source files in Visual C++ 6.0

a 夏天 提交于 2019-12-13 16:37:00
问题 Due to the legacy nature of some of our code, we're still using Microsoft Visual 6.0 (SP6). When I attach to a running process to debug it for the first time, it has no knowledge of where the source files are located when I break into the process. It therefore asks me to navigate to the appropriate directory in my source tree, given a source file name. It remembers these directories, so I don't have to enter the same directory twice, but it's still painful. Is there a way of pre-configuring

Need Platform SDK for VC6

倖福魔咒の 提交于 2019-12-13 12:05:41
问题 Does anyone know where I can download the last Platform SDK to work with VC6? The links I could find by Googling all seem to be dead. 回答1: I managed to find it here... (official or not) http://docs.moodle.org/dev/FebruaryPlatformSDK 回答2: If you have an MSDN subscription, the Platform SDK (February 2003) and others are available under "Tools and Resources -> Platform SDK and DDKs" 回答3: The last Windows Platform SDK that fully supported VC6 was the Windows 2003 SDK, February 2003. However,

GetSaveFileName() how to update the file extension in the “File name:” control?

情到浓时终转凉″ 提交于 2019-12-13 10:29:08
问题 I have the following code (extract) to display Save As dialog: char FileName[MAX_PATH] = "TestImage.jpg" ... lpofn.lStructSize = sizeof(OPENFILENAME); lpofn.hwndOwner = hWnd; lpofn.hInstance = GetWindowInstance (hWnd); lpofn.lpstrFilter = "JPG - JPEG File\0*.JPG\0TIF - TIFF File\0*.TIF\0PNG File\0*.PNG\0BMP - Bitmat File\0*.BMP\0"; lpofn.lpstrCustomFilter = NULL; lpofn.nMaxCustFilter = NULL; lpofn.nFilterIndex = 0; lpofn.lpstrFile = FileName; lpofn.nMaxFile = MAX_PATH; lpofn.lpstrFileTitle =