visual-c++-6

Migrated application crashes, if DEP is active

寵の児 提交于 2019-12-25 00:50:07
问题 I've ported our MFC application from vc6 to vc9 (VS2008). Everything's fine, but if DEP is active, program crashes (s. stacktrace below). I've already tried to play around with NX-Flag, but nothing changes. I also tried to build the application with Parasoft Insure++, but no memory corruptions or any other issues are shown. Thanks in advance for any advice. The environment is as described below: DEP option is NoExecute=OptOut, the program is in the exclude list (if not, it doesn't crash, but

unresolved symbols when linking against vc6 dll/lib

二次信任 提交于 2019-12-24 17:13:06
问题 I'm using vs2012 to create a small wrapper dll, linking against another dll (.lib) which was built with VC6. I get link errors like: error LNK2019: unresolved external symbol __imp__functionName@8 I added the lib file supplied with the vc6 dll to the link line, as I've done in the past... is there some version problem here? The vc6 dll header file declares the functions in what I think is the standard way: #define DLLIMPORT extern "C" __declspec(dllimport) DLLIMPORT ULONG WINAPI functionName(

User-Interface: Best way to toggle MDI frame's on-top status?

百般思念 提交于 2019-12-24 06:49:27
问题 I maintain an MFC (VC6) MDI application that uses Frame Windows as views for a document. There is only one document at a time but there are several MDI-Frames each with a different view of the document data. Recently a request came up to be able to keep one of those frame windows on top of the others while being able to interact with the background windows. One idea was to add a "pin-button" to the frame's title bar. During my research I found out that every implementation uses bitmaps

User Breakpoint from nowhere

╄→尐↘猪︶ㄣ 提交于 2019-12-23 08:57:56
问题 I have some code in MS VC++ 6.0 that I am debugging. For some reason, at this certain point where I am trying to delete some dynamically allocated memory, it breaks and I get a pop up message box saying "User Breakpoint called from code at blah blah".. then the Disassembly window pops up and I see *memory address* int 3 The odd thing is, there is NOWHERE in the code that I am calling an assembly instruction like this (I think asm int 3 is a hardware break command for x86?).. what could be

Compiler optimization causing the performance to slow down

泪湿孤枕 提交于 2019-12-21 17:24:01
问题 I have one strange problem. I have following piece of code: template<clss index, class policy> inline int CBase<index,policy>::func(const A& test_in, int* srcPtr ,int* dstPtr) { int width = test_in.width(); int height = test_in.height(); double d = 0.0; //here is the problem for(int y = 0; y < height; y++) { //Pointer initializations //multiplication involving y //ex: int z = someBigNumber*y + someOtherBigNumber; for(int x = 0; x < width; x++) { //multiplication involving x //ex: int z =

How to create a structure which contains a list of itself?

情到浓时终转凉″ 提交于 2019-12-21 12:33:24
问题 I want to create a structure which contains a list of same structure like this: #include <list> struct Url { CString strUrl; std::list<Url> children; }; int main() { Url u1, u2; u1.children.push_back(u2); } This code is not compiling. But when I replace std::list with std::vector it is working fine. How can I make this working with std::list ? Output window contains the following error. c:\program files\microsoft visual studio\vc98\include\list(29) : error C2079: '_Value' uses undefined

The compilation process

心已入冬 提交于 2019-12-20 10:11:15
问题 Can anyone explain how compilation works? I can't seem to figure out how compilation works.. To be more specific, here's an example.. I'm trying to write some code in MSVC++ 6 to load a Lua state.. I've already: set the additional directories for the library and include files to the right directories used extern "C" (because Lua is C only or so I hear) include'd the right header files But i'm still getting some errors in MSVC++6 about unresolved external symbols (for the Lua functions that I

What does msvc 6 throw when an integer divide by zero occurs?

拜拜、爱过 提交于 2019-12-20 06:49:06
问题 I have been doing a bit of experimenting, and have discovered that an exception is being thrown, when an integer divide by zero occurs. #include <iostream> #include <stdexcept> using namespace std; int main ( void ) { try { int x = 3; int y = 0; int z = x / y; cout << "Didn't throw or signal" << endl; } catch (std::exception &e) { cout << "Caught exception " << e.what() << endl; } return 0; } Clearly it is not throwing a std::exception. What else might it be throwing? 回答1: It's a Windows

did visual c++ 6.0 support unicode?

廉价感情. 提交于 2019-12-20 04:13:11
问题 i must migrate a c++ 6.0 project to visual c++ 2010 project.First, i must convert prj to unicode ,then convert to vs 2010.I confuse that did visual c++ 6.0 support unicode ?how to know it thanks 回答1: Yes, it supported Unicode exactly as the most recent version does. Setting the Unicode flag in your project produces a #define of the _UNICODE constant, which changes the names of the Windows API functions and changes CString to use wchar_t instead of char. 来源: https://stackoverflow.com/questions

vc++ 6.0 serial communicaton

穿精又带淫゛_ 提交于 2019-12-19 11:44:11
问题 In vc++ i am using MScomm for serial communication, i received data in this format 02120812550006050.0, i am not gettng how to read this ,in which format it is, begning starting frame and at the end ending file, remaing i dont know. EDIT 1: it contains date time and data how i can seperate this one 回答1: The funny characters are markers indicating things like record start, record end, field separator and so on. Without knowing the actual protocol, it's a little hard to tell. The data is a lot