|
|
You mentioned an error message, namely that 'the symbols for this document were not loaded' or something like that. This indicates one of the following:
1. No debugging/symbolic information was generated
--> check the compiler settings of your project, and/or specifically for this file to see if debugging information is being generated (Properties -> C/C++ -> General -> Debug information format). You need 'Program Database' or 'Program Database for Edit and Continue. Everything else will not allow the use of breakpoints
2. The debugging information could not be found
--> check the ouput folder to see if the *.pdb file (program database) is present for your project. It contains the symbolic information needed to interpret and use breakpoints. Specifically check the settings for your output files (Properties -> C/C++ -> Output files), whether the folder indicated there is still correct.
3. You're trying to set breakpoints within code that is not part of your project (e.g. code that is part of a DLL that your project uses), and that code has not been generated with debug/symbolic information. In that case rebuilding your project won't help.
4. You're trying to set breakpoints within code that is not part of your project (e.g. code that is part of a DLL that your project uses), and that code has been generated with debug/symbolic information, but the program database for this DLL is not accessible. This can happen if you copied the DLL to another folder so the EXE can access it, but forgot to copy the PDB file as well, which contains the symbolic information.
|
|
|
|
|
Can anybody direct me to something useful in the above mentioned
Thanks
Simon Smith
|
|
|
|
|
1. What does this have to do with C/C++/MFC?
2. Have you tried Google?
I must get a clever new signature for 2011.
|
|
|
|
|
I think you can create an ATL Project
|
|
|
|
|
And what has this to do with my suggestions to the OP?
I must get a clever new signature for 2011.
|
|
|
|
|
Hi,
I've 'ported' my client / server applicaton to Windows 7 32bit, but I can't get the client to connect to the server when they are both on the same machine (using address 127.0.0.1).
BUT, I can connect to the server on the XP machine using the client on the win7 machine across the LAN.
Or I can connect to the server on the win7 machine using the client on the XP machine.
Or I can connect to the server on the XP machine using the client on the same XP machine (using 127.0.0.1).
When I debug, there are no errors, and the servers blocks on accept() as normal.
I am totally at a loss to explain this or find a solution.
If anyone has any ideas, I'd love to hear them.
Thanks
|
|
|
|
|
are the server and the client running in separate processes?
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
Yes. Separate processes. Both using Winsock2.
|
|
|
|
|
then i can only guess that there is a misconfiguration.
the server must be configured to listen to a certain port say 205 on the localhost (127.0.0.1).
the client must send messages to that same port (205) on the localhost (127.0.0.1)
"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams
|
|
|
|
|
Thanks for your suggestion. The configuration seems to be OK. In any case, the port and IP is set correctly. Bizarrely currports show that the server is listening and that the connection is established on the client, but accept never unblocks.
I have now rewritten the client code using getaddrinfo() to request the socket and now it works. Inexplicably, it now works even though I am still connecting with the same socket and address.
I am curious to know why it works OK on XP but not Win7 in case I have future problems. I will post the server and client code snippets to see if you can see where the problem is.
Server:
err = WSAStartup( wVersionRequested, &wsaData );
sin.sin_addr.s_addr = htonl(INADDR_ANY);
sin.sin_port = htons(port);
sock = socket(AF_INET, SOCK_STREAM, 0);
qtest = bind(sock, (SOCKADDR *)&sin, sizeof(sin));
result = setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, (char *) &flag, sizeof(int));
...
test = listen(m_sock->get_sock(), 0);
m_sock->set_com_sock(accept(m_sock->get_sock(), (SOCKADDR *)&m_sock->get_sin(), &sinsize));
Client:
sin.sin_family = AF_INET;
WSAStartup(MAKEWORD(2,0), &WSAData);
sock = socket(AF_INET,SOCK_STREAM,0);
err = bind(sock, (SOCKADDR *)&sin, sizeof(sin));
err = connect(sock, (SOCKADDR *)&sin, sizeof(sin));
|
|
|
|
|
Without seeing some of your code it is difficult to offer any answers. However, I do not think there is an underlying Windows 7 problem as I have tested a similar configuration recently on my own Windows 7 system, and it worked without problems.
I must get a clever new signature for 2011.
|
|
|
|
|
Hi,
when i write the following, kindly guide me that the type of pointer *p and also the type(A or B) of object made in the same line (line 3).
Class A
{}
Class B : public A {}
main () {
A *p = new B; // line 3
}
|
|
|
|
|
Since p is declared as a type of A then the object returned from new will effectively be downcast to a type A object, so you will not be able to use any methods or properties unique to class B .
I must get a clever new signature for 2011.
|
|
|
|
|
However, he still could exploit polymorphism...
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]
|
|
|
|
|
downcast or upcast? A is at higher level in hierarchy.
|
|
|
|
|
aesthetic.crazy wrote: downcast or upcast?
You are casting from a derived class to a base class, and in English base is considered the lowest level, thus downcasting. I agree it's difficult because most diagrams give the impression that A (the base class) is at the top of the hierarchy.
I must get a clever new signature for 2011.
|
|
|
|
|
The type of the pointer is determined by the left hand side of the expression. The type of the created object is determined by the right hand side of the expression.
One interesting thing about C++ and C (to a lesser extent) is that when you declare a pointer you're not saying "this variable is a pointer to fixed class" but you're saying "this variable is a pointer to something with an interface of this type." In c this really only shows up when you convert to and from void * but in C++ it crops up a lot more (it's how C++ implements substitutability, AKA the Liskov Principle).
From this lot, when you write the expression:
A *p = new B;
you're saying two things to the compiler "p is a pointer to something with the interface of A" and "initialise that pointer with the address of a dynamically allocated B."
Cheers,
Ash
|
|
|
|
|
Some answers should have a "Really Good Answer" button.
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Hi all i have developed a MFC Dialoag based application (server application TCP/IP communication a socket programming) on windows xp sp2.
I am getting application error message on one of the machine. but some other machine it is working fine. I am not able to fix this bug please help me .
The Error message is:
The instruction at "0x7c911948" referenced memory at "0x00000000".The memory could not be "read",
click on OK to terminate the program
click on CANCEL to debug the program
What error it is and how to fix it ?
Thanks in advance
|
|
|
|
|
It means your app tried to access memory using a null pointer.
To fix: Run your app under the debugger, check the call stack when it breaks.
|
|
|
|
|
how to check the call stack.
|
|
|
|
|
Should be down the bottom, but you can activate it via Debug>Windows>Call Stack
|
|
|
|
|
i am using vc++ 6.0
i am not able to get this option Debug>Windows>Call Stack
|
|
|
|
|
View > Debug Windows > Call Stack
|
|
|
|