visual-c++-6

Check whether a Visual C++ 6.0 project did support unicode or not?

旧城冷巷雨未停 提交于 2019-12-13 08:47:57
问题 I need to know if a Visual C++ 6.0 project supports Unicode or not. How can I check that? 回答1: If the project is compiled with Unicode support, then the preprocessor directive UNICODE (or _UNICODE ) will be defined. Testing to see if this is defined will give you your answer: #if defined(UNICODE) || defined(_UNICODE) // The project is compiled for Unicode #else // The project is NOT compiled for Unicode #endif You can also check this from within your project's settings. From the "Project"

don't know how to use IShellWindows::Item correctly

点点圈 提交于 2019-12-13 07:00:47
问题 I'm using VC6 on XP system. The following is my code. It runs perfectly on my computer, but on other computers it seems that pisw->Item(v, &pidisp) doesn't equals to S_OK. Now I'm trying to figure out what's wrong here IShellWindows *pisw; if (SUCCEEDED(CoCreateInstance(CLSID_ShellWindows, NULL, CLSCTX_ALL, IID_IShellWindows, (void**)&pisw))) { VARIANT v; V_VT(&v) = VT_I4; IDispatch *pidisp; found = FALSE; for (V_I4(&v) = 0; !found && pisw->Item(v, &pidisp) == S_OK; V_I4(&v)++) {

MS VC++ 6 class wizard

淺唱寂寞╮ 提交于 2019-12-12 21:08:07
问题 Ok, I'm developing an application that has been in pretty much continous development over the last 16 years, from C in DOS, through various flavours of C++ and now is largely based around C++ with MFC and StingRay GUIs and various other SDKs. While I use VS 2005 for the release builds, I still use MSVC 6 for much of the GUI building, simply because ClassWizard is so much quicker in this environment than the weak equivalent tools that followed. Note that I am using ClassWizard to automatically

Why would fopen fail to open a file that exists?

依然范特西╮ 提交于 2019-12-12 08:53:45
问题 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

A list of known string issues in VC++ 6.0

女生的网名这么多〃 提交于 2019-12-12 04:22:35
问题 I am looking for some list containing all string related issues in VC++ 6.0 which are fixed in later service packs such as this one. Can anyone please help me on this regard? The reason for my search is this: We face some string related issues in our VC++ 6.0 based product. I am looking for other potential issues. Thanks. 回答1: You can seach MSDN knowledge base, troubleshooting and support. For example, a search with CString keyword will reveal many bug fixes. 回答2: I realise it can be a pain

Linker problems after switching to VS2005 from VC6 (LNK4099)

落花浮王杯 提交于 2019-12-11 19:37:33
问题 I ported one of my old projects to VS2005 and am having linker warnings such as xxxxx.lib(xxxxxxxx.obj) : warning LNK4099: PDB 'vc60.pdb' was not found with ...; linking object as if no debug info Now, I've tried rebuilding the project but the warnings won't go away. Is it really supposed to be looking for vc60.pdb and not vc80.pdb? I do have the vc80.pdb file.. Thanks 回答1: You have an .obj linked into your .lib that has debugging info in it; that debugging info has a link to the vc60.pdb. If

How to figure out what value MSVC is using for a preprocessor macro

倾然丶 夕夏残阳落幕 提交于 2019-12-11 02:11:16
问题 I'm attempting to use a /D compiler option on MSVC6 to define a string, but there's something weird about using double quotes around it. To debug this problem, it would be extremely helpful for me to be able to see what value the preprocessor is actually substituting into my code where the macro is expanded. Is there any way I can do this? I tried creating a Listing file with "assembly and source", but the source contains the original macro name and the ASM is some incomprehensible gibberish

Getting the length of an array. Compiler errors.

感情迁移 提交于 2019-12-11 01:18:13
问题 I've tried: template <typename T,unsigned S> unsigned getArraySize(const T (&v)[S]) { return S; } after Motti's answer https://stackoverflow.com/a/18078435/512225 but I've got this message: error C2265: '' : reference to a zero-sized array is illegal What's wrong with my compiler? I gave a look at this page: http://social.msdn.microsoft.com/Forums/windowsdesktop/en-US/4b78bcef-4c33-42f1-a4c5-fb6f702ced0b/vs6-c-compile-error-using-getaddrinfo so I tried this solution: template <typename T

error LNK2001: unresolved external symbol

我怕爱的太早我们不能终老 提交于 2019-12-10 17:37:29
问题 I am converting my project from vc6 to VS 2010.When I compile my project i get error as below for may .lib inputs. I have added all these lib in the Linker-> Input-> Additional Dependencies, also provided the path of these .lib files in Link->General->Additional Library directories. Any tip on this will be very helpful. lb0.lib(ob0.obj) :error LNK2001: unresolved external symbol "void __stdcall SetLastExP(class ExceptionClass *)" (?SetLastExP@@YGXPAVExceptionClass@@@Z) lb1.lib(ob1.obj) :

Catching exception in code

落爺英雄遲暮 提交于 2019-12-10 16:07:00
问题 I was trying this piece of code to check whether the divide by zero exception is being caught: int main(int argc, char* argv[]) { try { //Divide by zero int k = 0; int j = 8/k; } catch (...) { std::cout<<"Caught exception\n"; } return 0; } When I complied this using VC6, the catch handler was executed and the output was "Caught exception". However, when I compiled this using VS2008, the program crashed without executing the catch block. What could be the reason for the difference? 回答1: Enable