|
My application (32 bit) starts next process instance of itself. In new process I need to start debugging so I'm using __asm int 3; It worked good in WinXP/VS2008, it stopped the app and gave me selection whether start new VS instance or use existing VS instance to debug. I've switched to Win 7 64 bit and it does not work anymore. It offers nothing, app just hangs for some time, then exits, I cannot even attach debugger to the process manually. How can I solve this?
Thank you.
In VS options, the "Jst-in-time" I have all options active (managed,native,script)
modified on Friday, January 21, 2011 5:46 AM
|
|
|
|
|
try
#include "CrtDbg.h"
_CrtDbgBreak();
|
|
|
|
|
the same result
|
|
|
|
|
_CrtDbgBreak() is a valid function under Win64. Perhaps it expects a debugger to be attached.
Perhaps you could use something like:
while (!IsDebuggerPresent()) {
Sleep(1000);
}
It is quite a hack up, but if it is just for testing it doesn't really matter.
|
|
|
|
|
Thank you for tip.
while (!IsDebuggerPresent()) {
Sleep(1000);
}
__asm int 3;
works, but now I have to attach debugger to correct process manually It would me more convenient if it would work like before so other ideas are still welcome
|
|
|
|
|
Perhaps it is something wrong with your JIT settings.
I just ran
#include <Windows.h>
#include <CrtDbg.h>
int main() {
OutputDebugString(TEXT("Hello\n"));
_CrtDbgBreak();
OutputDebugString(TEXT("World\n"));
return 0;
}
Compiled in debug mode on VS 2008. It came up with the crashed message, 1 of the options was to debug the program.
This gave me an idea, if _CrtDbgBreak() doesn't work for you, just crash you program and attach the JIT then.
Once attached you can just drag the instruction pointer (the yellow arrow to the left of the code) to the next line and hit continue.
Something simple to crash your program would be
char *p = NULL;
*p = 0;
|
|
|
|
|
Andrew Brock wrote: char *p = NULL;
*p = 0; //Write 0 to an invalid address
also this does not work. It does nothing, but after some time standard windows crashed program dialog opens and offers me to send crash data to microsoft.
|
|
|
|
|
plz somebody tell me whats the problem with this little example? i get an error
Error 1 error LNK2019: unresolved external symbol "public: __thiscall B::B(void)" (??0B@@QAE@XZ) referenced in function _main
#include <iostream>
using namespace std;
class A {
public:
A();
~A();
};
class B : public A {
public:
B();
~B();
};
int main() {
A *p;
p = new B;
// ...
delete p;
}
|
|
|
|
|
If you declare the default constructors A::A() and B::B() then you must provide an implementation as well (the same applies to the destructors A::~A() B::~B() ).
Hence you either write:
class A
{
};
class B : public A
{
};
or
class A
{
public:
A(){}
~A(){}
};
class B : public A
{
public:
B(){}
~B(){}
};
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
can u just google it first.
Величие не Бога может быть недооценена.
|
|
|
|
|
if it is a resource dialog, just set the type to bitmap and select the image in the properties window.
If it is a coded control you need to pass in the BS_BITMAP flag with the flags to CreateWindow and then send the button a message with BM_SETIMAGE and a loaded HBITMAP or HICON with preferably PostMessage otherwise SendMessage
|
|
|
|
|
You got answers last time you asked this question[^]. Did it not work? What problems did you encounter?
|
|
|
|
|
Hi, whenever i run any code of C++ in Eclipse, it says binary not found??
|
|
|
|
|
(never used eclipse, but I assume its working is somewhat standard )
1- do you compile and link the code with no error ?
2- is there some kind of setting telling where the IDE (eclipse) can find the application when you want to "run" it ?
3- can you look in the folder where the source code is if there are obj files and resulting application ?
Other than that, I've got no clue.
Watched code never compiles.
|
|
|
|
|
What binary? Do you have the C++ CDT[^] installed?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
yes, n it is eclipse itself i guess
|
|
|
|
|
err.... not properly.
Eclipse itself is an empty interface with some API.
The CDT (C developmenet toolkit) is a (set of) plug-in that should be installed on top of it.
But there are also eclipse-cdt bundles (hence you're possible terminology confusion)
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hello,
is there any other function to rename folder as _wrename(old_name, new_name);
Thanks for any help
Arrin!
|
|
|
|
|
ShFileOperation (or IFileOperation ) is your friend.
look at the documentation on MSDN.
Watched code never compiles.
|
|
|
|
|
Hi,
thanx for answer!
Arrin!
|
|
|
|
|
Hi,
i forgot to say that this is a directory in a LAN?
In this case, do i have to do the same, to use same function SHFileOperation for network operations???
When i tray to do this, i receive an error like this "Invalid File path"??
Thanks
Arrin
|
|
|
|
|
Beware to string escapes: LAN names like \\server\share\dir\file.ext should be "\\\\server\\share\\dir\\file.ext".
It is one of the most common errors.
2 bugs found.
> recompile ...
65534 bugs found.
|
|
|
|
|
Hi,
thanks for answer, is that ah way to resolve a network drive to this LAN name?
My Letter is this one P on network, "P:\project\projectname.pf" how to resolve this name to "\\server\project\"??? Is there any solution for this??
I select this folder over an File Dialog, and they give me this path back, but how to convert him to this LAN name!
Thanks for any help!
Arrin
|
|
|
|
|
Hi,
when i try to use ShFileOperation i receive a error like "Folder is open by another application"???
My only problem that this dont work on LAN, over LAN!
In a local drive its all ok!
Arrin
|
|
|
|