|
Profiled/instrumented application can take a LOT longer to run than even a debug version.
Is the process running or is it standing still ( 0% CPU ) ?
just to be certain, put a couple of output traces here and there in your code to let you know that the thing is running ok.
|
|
|
|
|
It is standing still on 0% CPU. I have left it for quite a while without seeing anything happen.
Andrew Hoole
|
|
|
|
|
If you disable profiling, does it run as normal?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Dear all,
I changed tab style to display vertically at the rightside of the property page using TCS_RIGHT. But it is not visible first time the dialog appears and when i click any of the tab in the group ,all the tabs will appears.
The problem is the text in the tab control is still displaying in horizontal style
Regards
Manjunath S
Manjunath S
GESL
Bangalore
|
|
|
|
|
Are you using common controls version 6? If so, then the tab control no longer supports the left/right styles.
|
|
|
|
|
Michael Dunn wrote: ...common controls version 6? If so, then the tab control no longer supports the left/right styles.
Really? Is this because of the "This style is not supported if you use visual styles"
restriction?
|
|
|
|
|
Yes, that's what "This style is not supported if you use visual styles" means - that style bit gets ignored when you use common controls v6.
|
|
|
|
|
Never mind - I see it under TCS_BOTTOM, which is the first place I'd look if I wanted
tabs on the right
Thanks for the heads-up!
|
|
|
|
|
Hi all,
I'm looking for a more intellegent way to get data from a file and manage that data. For instance lets say i have a file with the following data in it:
[Category A]
filename = file1.txt
fileExtension = txt
[Category B]
ipAddress = 192.168.0.1
portNumber = 101
So how can I access only the parts within the file that is useful?? , without hardcoding anything.
Many Thanx
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
What about using XML ?
Another solution would be to use a class that parses INI files (that is, files that have the same structure as your). I think there are some such classes on this website.
|
|
|
|
|
Thank you Cedric...
"....I think there are some such classes on this website....." you mean on code project?
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: "....I think there are some such classes on this website....." you mean on code project?
Yes of course. Take a look here[^] for example (there are some other, just do a search in the articles in the MFC/C++ category).
|
|
|
|
|
Many thanx Cedric .... I appriciate the help
The only programmers that are better than C programmers are those who code in 1's and 0's.....
Programm3r
|
|
|
|
|
Programm3r wrote: [Category A]
filename = file1.txt
fileExtension = txt
[Category B]
ipAddress = 192.168.0.1
portNumber = 101
So how can I access only the parts within the file that is useful??
This is the format of a .ini file. Use functions like GetPrivateProfileString() .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello
on visual c++ 6
my pb is:
when I create a std::map in an exe and pass it to a object's method in a DLL, I can't access to the elements of the map (it crashs after the first access).
You can try this minimal code illustrating that.
the code: a main.cpp file: the "application".
dll.h and dll.cpp : the dll with the object's method:
main.cpp___________________________
#pragma warning( disable: 4786 )<br />
<br />
#include <map><br />
#include <iostream><br />
#include <string><br />
#include "dll.h"<br />
<br />
int main ()<br />
{<br />
std::map<const std::string, std::string> l_map;<br />
std::map<const std::string, std::string>::iterator it;<br />
int i;<br />
<br />
l_map["1"] = "2";<br />
l_map["3"] = "4";<br />
l_map["5"] = "6";<br />
<br />
for (it = l_map.begin(); it != l_map.end(); it++)<br />
{<br />
std::cout << (*it).first << ": " << (*it).second << "\n";<br />
}<br />
<br />
CDll obj;<br />
obj.f(l_map);<br />
<br />
std::cin >> i;<br />
return 0;<br />
}
dll.h________________________________________
#pragma warning( disable: 4786 )<br />
<br />
#include <map><br />
#include <iostream><br />
#include <string><br />
<br />
#ifdef DLL_EXPORTS<br />
#define DLL_API __declspec(dllexport)<br />
#else<br />
#define DLL_API __declspec(dllimport)<br />
#endif<br />
<br />
class DLL_API CDll<br />
{<br />
public:<br />
void f(std::map<const std::string, std::string>& p_map);<br />
};<br />
dll.cpp________________________
<br />
#include "dll.h"<br />
<br />
void CDll::f(std::map<const std::string, std::string>& p_map)<br />
{<br />
std::map<const std::string, std::string>::iterator it;<br />
<br />
for (it = p_map.begin(); it != p_map.end(); it++)<br />
{<br />
std::cout << "DLL: " <<(*it).first << ": " << (*it).second << "\n";<br />
}<br />
}<br />
Thank you in advance for your help.
Nico
|
|
|
|
|
Are both the DLL and the exe using the same runtime library ? You can check in your project setting -> C/C++ -> Code Generation -> Runtime library (for VC2005)
|
|
|
|
|
Oh ! you are here, too.
I tried to reproduce crash. But, no success.
May be problem is what Cedric is saying.
|
|
|
|
|
This is a known problem in the STL that comes with VC++6.0. See KB articles Q172396 and Q168958 for more details. In a nutshell, this has to do with how that STL implementation uses static data.
There are alternate STL implementations (like Dinkumware) that do not have this problem. At least, I think the old Dinkumware one you used to be able to purchase.
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Both Cedric and James are right. There are two problems with your approach:
1) The version of STL you are using is broken. You can try fixes available here[^]: or pick some other implementation of the Standard Library that works with VC6.
2) Even when you get a good STL implementation, you'd better ensure that all the modules use the same instance of the CRT.
In short, I think it is a good idea to follow Herb Sutter's advice and make the dll entries C (not C++) functions.
|
|
|
|
|
Nemanja Trifunovic wrote: In short, I think it is a good idea to follow Herb Sutter's advice and make the dll entries C (not C++) functions.
I don't recall ever seeing Sutter saying that. Do you have a reference for it?
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
|
I'll go back and re-read my copy to make sure. The reason I ask is because Sutter (along with Meyers) usually write about platform independent coding styles, so it would be unlike him to mention something specifically about DLLs. Especially since the same limitations are not placed on .so's in the *Nix world.
If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week
Zac
|
|
|
|
|
Zac Howland wrote: I'll go back and re-read my copy to make sure.
I think you'll find it in the item 63. Use sufficiently portable types in a module’s interface. or somewhere around it in the Namespaces and Modules part of the book.
|
|
|
|
|
Hi,
Recently I started working in VS2005 instead of VS6.
In VS6 I could add member veriables to my class by using the class wizard.
In VS2005 I'm able to add only one member veriable at a time(i.e - for each
member veriable i need to right click over the form , choose the Add veriable , add the member veriable and choose the finish option(I can't add more than one veriable in one session).
Is there another quick way to do so?
Regards,
Eli
|
|
|
|
|