visual-c++-6

Does static library avoids name mangling issues?

旧街凉风 提交于 2021-02-19 08:34:20
问题 I have a C++\MFC application written in Visual Studio 2003 SP1 links to an external static library "SomeExtStaticLib.lib". I also include the header files provided with "SomeExtStaticLib.lib" to create the objects in my application. SomeExtStaticLib.lib is a static library built with VC6. Now, I am migrating my application to Visual Studio 2008. I have very basic question. Should I also migrate the "SomeExtStaticLib.lib" to VS2008 compiled one? When I tried to use this VC6 compiled

VC6 on Win 10 Debugging when a DLL in another DLL gives User Breakpoint hit

痴心易碎 提交于 2020-06-01 06:11:42
问题 I just installed a Windows 10 machine, since Windows 7 is now dropped... along with the old, classic VC6. Plus the Service pack 6, and the Platform SDK installed. I have been using it this way with no issues on my Windows 7 machine for decades (too long to go into why not upgrade to VS 2010, 2012, 2015, 2017, 2019, yada yada, yada... Subject for a different debate) I brought up an existing project I was working in before the end of the year. Big exe, several DLLs in it, C++ objects, etc...

VC6 on Win 10 Debugging when a DLL in another DLL gives User Breakpoint hit

Deadly 提交于 2020-06-01 06:10:25
问题 I just installed a Windows 10 machine, since Windows 7 is now dropped... along with the old, classic VC6. Plus the Service pack 6, and the Platform SDK installed. I have been using it this way with no issues on my Windows 7 machine for decades (too long to go into why not upgrade to VS 2010, 2012, 2015, 2017, 2019, yada yada, yada... Subject for a different debate) I brought up an existing project I was working in before the end of the year. Big exe, several DLLs in it, C++ objects, etc...

resolve_initial_references causes a SystemException

和自甴很熟 提交于 2020-01-15 06:22:42
问题 We use an ActiveX control in our client, developed with Visual C++ 6.0, in our application. We also use omniORB 2.7 to provide the connection to the server app. It's been working fine; but right now we need to run this application on a Windows 7, 64-bit PC. The ActiveX control is working; but in the C++ code, when it calls ORB's resolve_initial_references function as below: try { // Obtain a reference to the root context of the Name service: CORBA::Object_var initServ; initServ = orb->resolve

wrong argument conversion preferred when calling function

本小妞迷上赌 提交于 2020-01-04 04:00:46
问题 I'm writing a program under MS Visual C++ 6.0 (yes, I know it's ancient, no there's nothing I can do to upgrade). I'm seeing some behavior that I think is really weird. I have a class with two constructors defined like this: class MyClass { public: explicit MyClass(bool bAbsolute = true, bool bLocation = false) : m_bAbsolute(bAbsolute), m_bLocation(bLocation) { ; } MyClass(const RWCString& strPath, bool bLocation = false); private: bool m_bAbsolute; bool m_bLocation; }; When I instantiate an

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

不问归期 提交于 2020-01-02 08:43:30
问题 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

Cannot convert from 'const wchar_t *' to '_TCHAR *'

感情迁移 提交于 2019-12-30 18:44:06
问题 _TCHAR* strGroupName = NULL; const _TCHAR* strTempName = NULL; //Assign some value to strTempName strGroupName = _tcschr(strTempName, 92) //C2440 I get an error at the above line while compiling this code in VS2008. In VC6 it compiles fine. Error C2440: '=' : cannot convert from 'const wchar_t *' to '_TCHAR *' What seems to be the problem and how do I fix it? 回答1: Try casting it as strGroupName = (_TCHAR*)_tcschr(strTempName, 92); Seems to me that VS2008 got a little more strict on type casts

Will new return NULL in any case?

不问归期 提交于 2019-12-27 10:54:20
问题 I know that according to C++ standard in case the new fails to allocate memory it is supposed to throw std::bad_alloc exception. But I have heard that some compilers such as VC6 (or CRT implementation?) do not adhere to it. Is this true ? I am asking this because checking for NULL after each and every new statement makes code look very ugly. 回答1: VC6 was non-compliant by default in this regard. VC6's new returned 0 (or NULL ). Here's Microsoft's KB Article on this issue along with their

Notification for the end of Printing and Print Preview of the CHtmlView and derived Classes

可紊 提交于 2019-12-25 07:08:55
问题 How the Print and Print Preview ending notifications are done in the CHtmlView class? Normal CView related classes have the OnEndPreview() and OnEndPrinting() evnets that were called by the framework itself and we can override them for the appropriate context. void CMyHtmlView::OnFilePrintPreview() { // Before this I will call a Function Generate a HTML File in a Location and Updated in m_sFileName Navigate2(m_sFileName); ExecWB(OLECMDID_PRINTPREVIEW, OLECMDEXECOPT_PROMPTUSER, NULL, NULL ); }

error when convert project from vc 6.0 to vc 2010

你离开我真会死。 提交于 2019-12-25 05:12:06
问题 i have successfully compile and build c/c++ project on visual c++ 6.0 to dll .But when i convert to visual c++ 2010 on windwos 7 64bit os it appear many error .source code is typedef struct { int _entID ; /* Entity ID */ int _recID ; /* Recode No. */ int _Nmbr ; /* 画像番号 0020:0013 */ int _Clmns ; /* マトリクス X 0028:0011 */ int _Rws ; /* マトリクス Y 0028:0010 */ int _ImagCnt ; /* 複数フレーム数 0028:0008 */ char _Type[ 68 ] ; /* 画像タイプ 0008:0008 */ char _cUID[ 68 ] ; /* クラス UID 0004:1510 */ char _sUID[ 68 ] ;