|
Windows Xp,Visual studio 6 service pack 3, Win32 c++dll
Have a C++ driver and it calls the dll in a loop. The code executes once and crashes before it gets around to the top of the loop. So...I would like to know how to step into the code of the dll. I have the code in a different project.
One time i accidentally did this so i know it can be done BUT i don't recall how.
Googling is not very enlightening atm
|
|
|
|
|
If it's your DLL then just create a debug version, link to it and run your program through the debugger. Set a breakpoint at some appropriate location in order to step into the DLL.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
AND if the DLL is dynamically, laoded, go to the part of the development environment that lets you set up DLL to be loaded early, otherwise your breakpoint will start off disabled.
Worst case, temporarily hard code a DebugBreak in the loop and when that is hit, the system will drop you into the debugger.
|
|
|
|
|
Very interesting, but I think you should direct your comments to the OP.
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
If your calling program is managed code and the DLL is unmanaged, you need to go to the project properties, Debug tab, and click the "Enable unmanaged code debugging" check box.
|
|
|
|
|
Trying to compile a small library but getting this error message in the header file. The header contains one function where one of the parameters is of type 'BOOL'. Using Visual C++ 6.
Any ideas how to get rid of this?
|
|
|
|
|
include windows.h before such header.
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]
|
|
|
|
|
Or add it on top of the header file itself...
|
|
|
|
|
Really I can't understand univoters...
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]
|
|
|
|
|
CPallini wrote: Really I can't understand univoters...
Smile
Even this is true in most parts, isn't it ?!
...byte till it megahertz...
|
|
|
|
|
bleedingfingers wrote: Even this is true in most parts, isn't it ?!
Yes, I think that's true: you can't understand voters...
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]
|
|
|
|
|
CPallini wrote: Really I can't understand univoters...
Currently, this is true for me!
|
|
|
|
|
I am learning C++ and would like to find out from the veterans out there what is the most efficient way of learning this language. Through research I have found the book "C++ How to Program" by P.J. Deitel and am working through the book. I also have on order "C Primer Plus" by Stephen Prata.
Though my "How to Program" has limited questions and exercises. Secondly you have to have an instructor's edition to verify the answers to exercises and this resource is not accessible to the general public.
Does anyone out there know of any good workbooks with questions and exercises and answers to these items?
Secondly, what is the most recommended learning path.
|
|
|
|
|
forexsurfr wrote: Secondly, what is the most recommended learning path.
There's no secret: learning to be a good programmer is like learning to be a good musician. It comes from practising, a lot. Work on different kind of projects, by starting to work with people that have more experience than you and will be able to guide you. Looking at code developped by others and trying to understand it also helps a lot.
|
|
|
|
|
My first bit of advice is don't use that Deitel book. It was the recommended text for a module of an MSc course I did a couple of years ago and it was truly appalling. I'd also be wary of Stephen Prata's book. I am a fan of his "C primer" (I learnt C from it years ago) but his C++ book was too much like the C book to avoid confusing people.
I'd recommend "Programming -- Principles and Practice Using C++" by Bjarne Stroustrup, it's a lot better introduction to C++ and programming in general. If you already know a programming language then "Accelerated C++" by Koenig and Moo is pretty good. I've seen five people now successfully use "Accelerated C++" to become effective fairly quickly with self study.
Cheers,
Ash
|
|
|
|
|
forexsurfr wrote: Secondly, what is the most recommended learning path.
Start coding. Do it a lot, have fun and also talk with other coders. Sooner or later you will see it's a team sport.
|
|
|
|
|
forexsurfr wrote: I am learning C++ and would like to find out from the veterans out there what is the most efficient way of learning this language.
By using it.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Thank you everybody for your help and direction.
|
|
|
|
|
Ivor Horton has a good book on Visual C++ 2008.
He teaches C++ in the first half of the book and Windows Programming in the second half. He's still uses MFC for most of the book (which is a good thing IMO) but he has adapted and incorporated WinForms and some managed code for those who want it.
I've been very impressed with his teaching style and his choice of topics to cover.
|
|
|
|
|
I have to say the way I learned C++ was thru the Horton's book already mentioned. I started with version 6 of his and worked thru 2005 etc. Very good book. However, if you are not a good book-learner type of person I highly recommend a continuing education class. I took a certificate program thru a local university that was 2 years long after all the classes were gone thru and it proved very very valuable having someone to bounce things off of like an experienced instructor ( in addition to homework and tests!). I think you can prevent learning bad habits that way....
michael judy
m_judy@hotmail.com
"According to my calculations there is no problem"
|
|
|
|
|
Do not use any of the Microsoft code samples as examples of good coding.
Once you agree to clans, tribes, governments...you've opted for socialism. The rest is just details.
|
|
|
|
|
Seconded.
Many of the MS examples involve using the windows library, or worse, MFC. And these are still full of bad code, such as global #defines that mess up your code with no identifyable error message, and conflicting type definitions ('Handle' anyone?). In the end half the problems you'll encounter will be caused by MS stuff and not by your lack of understanding C++!
Best way to start learning is avoid windows programming and instead do a few command line applications.
Personally I never really used a book to learn C++, mostly because at the time I started there weren't any (more to the point, the language was still in development and I was using a precompiler that converted C++ code into C before starting the actual compiler).
If I were to recommend a book to buy, it would be "The C++ Programming Language" by Bjarne Stroustrup. Considering that it is not exactly named to be a learning book, it does contain very good explanations of the mechanisms, lots of examples, and at the end of each chapter there is a list of exercises that you can do. The nice thing about the book is that after almost 30 years of C++ programming I can still find useful advice or examples inside whenever I dig into some of the less familiar constructs (e. g. virtual inheritance or template specialization).
|
|
|
|
|
Stefan63 wrote: the language was still in development and I was using a precompiler that converted C++ code into C before starting the actual compiler
Been there, done that. Weren't the 80s fun? Not only no debugger, you had to figure out if it was your bug or the way the translator was mangling your C++ code into C or a bug in the C compiler.
Once you agree to clans, tribes, governments...you've opted for socialism. The rest is just details.
|
|
|
|
|
Hi!
I've to convert a wide char string to tolower. This the code I used.
s32 id = profileList->getSelected();
stringw strtoDelete = profileList->getListItem(profileList->getSelected());
if(!strcmp(reinterpret_cast<const char*>(tolower(strtoDelete.c_str())),reinterpret_cast<const char*>("default")))
{
profileList->removeItem(id);
}
But I got the following errors:
Error 5 error C2143: syntax error : missing ')' before '{' d:\goldminer\source\game\gamemenuprofilestate.cpp 237
Error 4 error C2661: 'strcmp' : no overloaded function takes 1 arguments d:\goldminer\source\game\gamemenuprofilestate.cpp 236
Error 3 error C2664: 'tolower' : cannot convert parameter 1 from 'const wchar_t *' to 'int' d:\goldminer\source\game\gamemenuprofilestate.cpp 236
7 IntelliSense: argument of type "const wchar_t *" is incompatible with parameter of type "int" d:\goldminer\source\game\gamemenuprofilestate.cpp 236
How to convert a wide char string to tolower?
|
|
|
|
|