visual-c++-6

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

梦想的初衷 提交于 2019-12-05 16:51:37
Is it possible to use a C++ static library (.lib) compiled using Visual Studio 6 in Visual Studio 2008? 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. It really depends. Does the lib expose only 'extern "C"' functions where memory is either managed by straight Win32 methods (CoTaskMemAlloc, etc) or the

VisualC++ 6.0 with unsigned long long and sprintf

核能气质少年 提交于 2019-12-05 01:45:29
问题 I want to sprintf() an unsigned long long value in visual C++ 6.0 (plain C). char buf[1000]; //bad coding unsigned __int64 l = 12345678; char t1[6] = "test1"; char t2[6] = "test2"; sprintf(buf, "%lli, %s, %s", l, t1, t2); gives the result 12345678, (null), test1 (watch that test2 is not printed) and l = 123456789012345 it gives an exception handle any suggestions? 回答1: To print an unsigned __int64 value in Visual C++ 6.0 you should use %I64u , not %lli (refer to this page on MSDN). %lli is

Visual Studio 6 C++ Crash in Windows 8.1 [duplicate]

别说谁变了你拦得住时间么 提交于 2019-12-05 01:34:36
问题 This question already has answers here : Running Visual Studio 6 C++ in Windows 8.1 (8 answers) Closed 4 years ago . Some of the developers here installed 8.1 last night and when we went to boot up VC6.. and instant crash on the splash screen. We have tried the standard compatibility changes, run as administrator, etc etc and no luck. Anyone else have these issues as well? Have you been able to resolve them anyway? It worked last night on Windows 8 just fine... Details on crash. Go to msdev

Are there any reasons not to use Visual Studio 6 for C++? [closed]

血红的双手。 提交于 2019-12-04 14:58:38
Are there any reasons why I shouldn't use Visual Studio 6 for C++ development? Where can I find some resources why this would or wouldn't be a good idea? Are there any lists of issues I would have with this? std::string multicore/proc issues in the runtime, re: KB813810 poor STL support even poorer Standard C++ support Don't do it. Roger Lipscombe I wouldn't say that Visual Studio 6 should "never" be used for C++ development. I would say that it should "no longer" be used for C++ development. Reasons: Microsoft's later compilers (particularly Visual Studio 2008) are much more compliant with

CPrintDialog Creation Failing in Service Mode of an Application

跟風遠走 提交于 2019-12-04 06:37:11
问题 I have an application that prints the report automatically. I am using CPrintDialog to get the Printer DC. void CMyClass::PrintReport() { CDC dc; CPrintDialog printDlg(FALSE); printDlg.GetDefaults (); ::DeleteDC( printDlg.m_pd.hDC ); LPDEVMODE pDevMode = printDlg.GetDevMode(); if(pDevMode) { pDevMode->dmOrientation = DMORIENT_LANDSCAPE; ::GlobalUnlock(pDevMode); } HDC hDC; if( (hDC = printDlg.CreatePrinterDC()) == NULL ) { ::GlobalFree( printDlg.m_pd.hDevMode ); ::GlobalFree( printDlg.m_pd

Why would fopen fail to open a file that exists?

≯℡__Kan透↙ 提交于 2019-12-04 06:01:43
I'm on Windows XP using Visual Studio 6 (yes I know it's old) building/maintaining a C++ DLL. I'm encountered a problem with fopen failing to open an existing file, it always returns NULL. I've tried: Checking errno and _doserrno by setting both to zero and then checking them again, both remain zero, and thus GetLastError() reports no errors. I know fopen isn't required to set errno when it encounters an error according to a C standard. Hardcoding the file path, which are not relative. Tried on another developers machine which the same result. The really strange thing is CreateFile works and

Need Platform SDK for VC6

♀尐吖头ヾ 提交于 2019-12-04 04:27:40
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. I managed to find it here... (official or not) http://docs.moodle.org/dev/FebruaryPlatformSDK If you have an MSDN subscription, the Platform SDK (February 2003) and others are available under "Tools and Resources -> Platform SDK and DDKs" The last Windows Platform SDK that fully supported VC6 was the Windows 2003 SDK, February 2003. However, through legitimate channels, you can not find this SDK for download anymore, and it looks like no one even has it for

.lib and .dll Backward Compatibility

爱⌒轻易说出口 提交于 2019-12-04 03:03:06
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! 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 and .dll, those files are getting linked against those editions of the runtime. Problems will typically be

Visual Studio 6 C++ Crash in Windows 8.1 [duplicate]

非 Y 不嫁゛ 提交于 2019-12-03 16:54:03
This question already has answers here : Closed 4 years ago . Running Visual Studio 6 C++ in Windows 8.1 (8 answers) Some of the developers here installed 8.1 last night and when we went to boot up VC6.. and instant crash on the splash screen. We have tried the standard compatibility changes, run as administrator, etc etc and no luck. Anyone else have these issues as well? Have you been able to resolve them anyway? It worked last night on Windows 8 just fine... Details on crash. Go to msdev.exe Double click msdev.exe Splash screen opens. Crash. (Microsoft Developer Studio has stopped working)

Is it time to say goodbye to VC6 compiler?

二次信任 提交于 2019-12-03 13:25:37
问题 Of late I'm facing the issues that points finger to VC6 compiler. Few of them are: A function-try-block doesn't work. Related Q in-class constant doesn't work. __FUNCTION_ (Macro to get function name) doesn't work The latest addition is it doesn't allow void functions to be passed as part of for_each. The below example is not compiling with VC6 compiler. It says "error C2562: '()' : 'void' function returning a value". It looks like VC6 doesn't like void functions to be passed to for_each.