visual-c++-6

VC++ 6.0 access violation when run in debugger

折月煮酒 提交于 2019-12-08 14:25:33
I am trying to add enhancements to a 4 year old VC++ 6.0 program. The debug build runs from the command line but not in the debugger: it crashes with an access violation inside printf(). If I skip the printf, then it crashes in malloc() (called from within fopen()) and I can't skip over that. This means I cannot run in the debugger and have to rely on the old printf statements to see what's going on. This obviously makes it a lot harder. Any idea why printf() and malloc() would fail when running under the VC++ debugger? I am no good at this low level stuff! Here is the call stack after the

Beginner Visual C++ 6 tutorial [closed]

人走茶凉 提交于 2019-12-08 12:04:23
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed last year . here is my situation. I have an small console application written in C++ (it makes and saves a .avi file into HD). I have to make it a visual app in order to set times, frames per second, etc. I have NO IDEA how to start. I never used Visual C++ before. I can't even open a simple "OK, Cancel" dialog box... I need

Browse VC6 DLL variables content (DEBUG)

醉酒当歌 提交于 2019-12-08 10:12:06
问题 I'm trying to debug an old VC6 dll, I manage to go through the code but unfortunately my vc9 debugger doesn't show the content of the variables in the dll. (browsing info I guess) I manage to see the content of my dll when I debug it in VC6 but I would prefer to be able to debug in the same time as my managed code. Maybe I'm missing some compilation parameters in my VC6 project. Would be great if someone had any idea, I'll then gain a lot of time. Thanks in advance, Boris 回答1: Starting (I

VC++ 6.0 access violation when run in debugger

戏子无情 提交于 2019-12-08 08:17:03
问题 I am trying to add enhancements to a 4 year old VC++ 6.0 program. The debug build runs from the command line but not in the debugger: it crashes with an access violation inside printf(). If I skip the printf, then it crashes in malloc() (called from within fopen()) and I can't skip over that. This means I cannot run in the debugger and have to rely on the old printf statements to see what's going on. This obviously makes it a lot harder. Any idea why printf() and malloc() would fail when

Adding resource file to VC6 dll

十年热恋 提交于 2019-12-08 02:39:34
问题 I have a number of VC 6.0 projects (dsps) which build into dlls which don't have resource files. Any idea how to add resources into an existing project? The project is due for a major release shortly and I want to add a fileversion to those dlls currently lacking one. The dlls will be recompilied before release so I'm just trying to make these dsps like all the others I've inherited with this project (that do have a file and product version etc so that we can easily tell exactly what is

Can I use a Visual Studio 6 compiled C++ static library in Visual Studio 2008?

落爺英雄遲暮 提交于 2019-12-07 07:05:17
问题 Is it possible to use a C++ static library (.lib) compiled using Visual Studio 6 in Visual Studio 2008? 回答1: I shouldn't think why not - as long as you keep the usual CRT memory boundaries (ie if you allocate memory inside a library function, always free it from inside the library - by calling a function in the lib to do the freeing). this approach works fine for dlls compiled with all kinds of compilers, statically linked libs should be ok too. 回答2: It really depends. Does the lib expose

Adding resource file to VC6 dll

落爺英雄遲暮 提交于 2019-12-06 06:58:00
I have a number of VC 6.0 projects (dsps) which build into dlls which don't have resource files. Any idea how to add resources into an existing project? The project is due for a major release shortly and I want to add a fileversion to those dlls currently lacking one. The dlls will be recompilied before release so I'm just trying to make these dsps like all the others I've inherited with this project (that do have a file and product version etc so that we can easily tell exactly what is running on a customer's machine. One answer : Create an *.rc and resource.h file (copy from another project?

What does the /TSAWARE linker flag do to the PE executable?

为君一笑 提交于 2019-12-05 22:12:33
After adding the /TSAWARE linker flag to one of my projects (Visual Studio 6), I was surprised to find a new section in the PE file (.idata). If I don't set the flag, the imports are merged into .rdata. To illustrate the "problem" we start out with a simple console program: #include <stdio.h> int main() { printf("hello world\n"); return 0; } and compile with: cl /Og /O1 /GF /WX /c main.c Then link with link /MACHINE:IX86 /SUBSYSTEM:CONSOLE /RELEASE /OUT:a.exe main.obj link /MACHINE:IX86 /SUBSYSTEM:CONSOLE /RELEASE /OUT:b.exe /TSAWARE main.obj Let's compare the dumpbin output: Dump of file a

Convert CString to string (VC6)

早过忘川 提交于 2019-12-05 21:07:55
I want to convert CString to string. (Yup. I know what am I doing. I know the returned string will be incorrect, if CString value range is outside ANSI, but That's Is OK!) The following code will work under VC2008. std::string Utils::CString2String(const CString& cString) { // Convert a TCHAR string to a LPCSTR CT2CA pszConvertedAnsiString (cString); // construct a std::string using the LPCSTR input std::string strStd (pszConvertedAnsiString); return strStd; } But VC6 doesn't have CT2CA macro. How I can make the code to work as well in both VC6 and VC2008? Microsoft says that CT2CA replaces

.lib and .dll Backward Compatibility

本秂侑毒 提交于 2019-12-05 18:16:26
问题 I currently have a VS6 unmanaged C library that I deliver as either a .lib or .dll. I want to upgrade to VS2010 but I still have users that are in VS6, VS2005, and VS2008. Can a .lib or .dll built in VS2010 be used in VS6, VS2005, or VS2008? Thanks! 回答1: It depends on the runtime used to build the libraries. I would typically run into this problem when upgrading solutions from VS2005 to VS2008. The default runtime libraries are different from edition to edition. When you're building the .lib