|
I have a vs2005 project which calls a vc6 produced dll, and in that dll there are some classes which use CMap,CList classes.After calling functions in that dll, the vs2005 project crash when CMap class destructor is called.Anybody knows the reason?
|
|
|
|
|
brucerain wrote: Anybody knows the reason?
yes, your VC6 dll doesn't like being referred to as 'deprecated', so it's giving you a hard time.
Seriously though, how do you expect us to know the reason? The VS version used has nothing to do with your problem. It's a bug in the code, nothing more nothing less.
|
|
|
|
|
What does "a bug in the code" means? If it means a bug in the VC6 class library,then we have to upgrade the old DLL to VS2005.Is it right?
|
|
|
|
|
The problem is usually that memory is being allocated in one DLL and freed in another DLL. If you're passing a CMap (or other C++ object that does allocations) between DLLs, you'll need to redesign the code so it doesn't do that.
|
|
|
|
|
Hello.
I have a small problem like this.
Assume, I want to set breakpoint at MessageBoxA in User32.dll.
Could you give me some tips.
I have my way but it is not convenient:
I use depends.exe ( one of the tools of VS ) and find where is a address of MessageBoxA function, plus real address of User32.dll when I debuge, I will get the address of MessageBoxA; goto this address and set breakpoint here. But I do not like that.
Hope you can help me.
Thank you.
|
|
|
|
|
It is as far as I know the only way,(any other way would be broadly similar, you have to find the functiobn in the disassembly of User32.dll) unless if you have access to the source code of User32.dll You would also need the Debug Version of User32.dll;)
Microsoft has as far as I know not made these public.
LateNightsInNewry
|
|
|
|
|
in IDA, I can set breakpoint at these function very easy with address user32_MessageBoxA. But I prefer Visual Studio debugger.
If someone know, please tell me.
Thanks.
|
|
|
|
|
Hey, I know it.
Just type MessageBoxA in location.
It works for VS 2005, I do not know if others.
Thanks.
|
|
|
|
|
I want to use check boxes in a menu as item. The idea is, user can select a feature by checking a box in the menu. How to show a check box in a menu item?
|
|
|
|
|
Why you dont use of CheckMenuItem
|
|
|
|
|
I want to set my window in the middle of the desktop as well as when I select the combo. it will open the file/folder dialog but it will open at top-left side i want to display it at the center of my application window.
how should i change my code accroding?
|
|
|
|
|
You need to see how MFC function CWnd::CenterWindow is impplemeted. Step through that function while debugging and see how it is implemented.
|
|
|
|
|
I have a small program that is written on Borland C++ 3.1, it worked probarly on Win98 but now I need to reuse this program on WinXP, howerver there is an error when i use it on WinXp. Any body know to convert this program into Win32 application. What is bios.h header file. Could I rewrite a new application and then aopy these code again?
|
|
|
|
|
The problem is that functions defined in the ‘bios.h’ (equivalent to MS ‘dos.h’) header file are used to access low level bios functionality (indirect assembly code). In other words, it is designed to talk to the computer at the bios (or machine) level. These functions usually need to be replaced with equivalent Win32 functions that you may need to write yourself. I know that there is a [free] driver on the Net that allows you to access this level (ring 0), because I have used it, but I do not remember what it is called.
Kiethnt wrote: Could I rewrite a new application and then aopy these code again?
Well yes and no, in either case you will need to recompile the code and look at the errors (or warnings) and figure out how to do the equivalent in Win32
INTP
"Program testing can be used to show the presence of bugs, but never to show their absence."Edsger Dijkstra
|
|
|
|
|
Hello,
I am trying to extract data from an application with a sharedmem, however the function call to OpenFileMapping requires that I have the name of the file mapping object which I don’t have.
Is there some way that I can find the name of the available file mapping object for this application?
|
|
|
|
|
No, there isn't. The other application may have created multiple file-mapping objects, each with or without a name. If it's a named file-mapping object, that name has to be unique within the application. I *think* you can create multiple unnamed file-mapping objects.
Best,
Jun
|
|
|
|
|
way to change the backcolor of radio button in MFC
|
|
|
|
|
Please see this[^]
PS: I have sent your previous message[^]to spam.
Nobody can give you wiser advice than yourself. - Cicero
ப்ரம்மா
|
|
|
|
|
|
Did you see my answer and did you try it and same question not helpfuls.
|
|
|
|
|
|
|
I want to handle the ESCAPE key in certain situation; I try to catch it in PreTranslateMessage with WM_KEYUP.
Pressing ESCAPE leads always to the "cancel" result.
If I have a control named IDCANCEL, the OnClicked handler receives the control, whenever
ESACPE has been pressed, but I can not differentiate between clicking on that control
and the "true ESCAPE".
Is there a way I can separate the "escape" key from the CANCEL button and from "exit" ("X" in the system menu)?
Actually, I need it in a CEdit control.
|
|
|
|
|
Refer this[^].
Similarly, use VK_RETURN for enter key.
|
|
|
|
|
Thanks, it works with KEYDOWN
|
|
|
|