|
Use "Call Stack" to view history of function calls leading to exception.;)
ARSALAN MALIK
|
|
|
|
|
you cannot debug a program compiled in "Release Mode". if you have the source, use the call stack (as said previously) or place some breakpoints where you want to stop the execution, but be SURE you are compiling in "DEBUG MODE ".
you could also click on the rebuild all menu item ; sometimes, it is useful 'cause VC++ fails in its links.
Otherwise, two choices for you : first of them, you learn pentium assembly
second one, you let the program with its bugs and throw it to the trash...
TOXCCT >>> GEII power
|
|
|
|
|
hello sir
I am working on disk imaging. I am able to read the hard disk and getting its image in a file and in a buffer.I am also able to write this image back. but i want to connect an image of hard disk as a virtual logical disk.So that i am able to cut, copy data from that virtual drive. Plz help me by giving programming clue and solution of this problem.
With best regards
darpan kamboj
|
|
|
|
|
Hi
There are many Win32 APIs that when passed with a NULL returns the size of the buffer it is expecting (say- GetLogicalDriveStrings).
The question is which one would be better.
1. Create a reasonable sized array and call api.
2. Call the API twice and then allocate.
Regards
Shiraz
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
I'm yet to see the speed of a program be affected by doing twice API calls: most slow code I've seen was because of bad coding practices (aka messy, ill-written and structured code) or because of poor algorithms.
Answering your question: you don't need to pass NULL on the first call - you can use a reasonable sized array. Then, if the call fails because of the buffer size, you can retry it with a bigger buffer.
Yes, even I am blogging now!
|
|
|
|
|
Premature optimization is the root of all evil. (in programing)
Do not ask this question unless you have your app mostly completed, it is running too slow, and you have determined that calls to one particular API are taking too long!
In general if you know the size of data you need it doesn't matter if the API can return more, just ask for how much of it you will need. If you don't know, then pick one of the two.
|
|
|
|
|
Hi
I have completed the whole application. And My application also runs quite fast .
But its always good to understand what we have done is DONE, atleast thats why it is called software engineering.
Regards
Shiraz
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
If you realy want to know where your code is spending its time then profiling is the answer. I find Glowcode www.glowcode.com[^] very good for this.
Neville Franks, Author of ED for Windows www.getsoft.com and coming soon: Surfulater www.surfulater.com
|
|
|
|
|
For what CPU with what cache size? How much memory are we talking about in the typical case? Worse case? Best case? What compiler? What memory manager in the OS and/or standard libraries? How complex is the function you are calling?
These can make a LARGE difference. And they affect each other. (compilers optimize different for different CPUs, and different optimizations change what it is best) Even given two otherwise identail CPUs, except for cache sizes, there can be a difference. And of course if your function is slow you need to give it enough memory so you don't have to do it again.
As for engineering, smart engineers know when to quit. You will never have time in your life to learn it all! Learn what is important now, and be aware of what you don't know. If it becomes important, learn it then.
|
|
|
|
|
zainu wrote:
The question is which one would be better.
"Better" means different things to different people.
10-15 years ago when a program's efficiency had to be measured with a micrometer having 0.001" precision, this might have been a valid concern. Today it will go unnoticed, mainly because so many things are also going on. Asking the memory manager for another 10KB of memory, or spending a few more CPU cycles calling a function an extra time pale in comparison.
Do what you need to to make your code work with as few errors as possible.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi..
Thankyou all for your suggestions...
I just asked this question inspired by curiosity..
Its true that efficiency is a compramise between memory and cpu cycles. Anyway I believe we should keep these things in mind while creating softwares.
Thanks again
Regards
Shiraz
The Best Relligion is Science.
Once you understand it, you will know God.
|
|
|
|
|
I need help,
I want to use gdiplus.dll but explicitly
This question is also general
How can I explicitly use class from some DLL library?
I know how to use function, I can imagine variable
..but how to manage Class with all its class member function
Thanx
viliam
|
|
|
|
|
hi,
i'm using 2 edit boxes.
In one edit box, i've to give characters.
But in second edit box, i've to receive char by char for each click of combo button.
How is it possible?
Pls help.
Mithila.
mithila
|
|
|
|
|
hi,
i'm using 2 edit boxes.
In one edit box, i've to give characters.
But in second edit box, i've to receive char by char for each click of a button.
How is it possible?
Pls help.
Mithila.
mithila
|
|
|
|
|
anuchelvi wrote:
How is it possible?
First off, what part is giving you trouble(s)? Second, what is a "combo button?"
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi. Can anyone please tell me how do i make an animated greetings or any sort of message to be displayed when user starts the program. Any suggestion would be very wellcome.
|
|
|
|
|
Do you want to create a Splash Screen?
ARSALAN MALIK
|
|
|
|
|
Yes. I was thinking of an animation displaying a wellcome notice in dialog based aplication before dialog box is shown. I would like it to be whole-screen size and it needs to go off when finished. Can you give me a hint or two? I never worked with splash screen before. Regards, Gregor.
|
|
|
|
|
whole screen ?!?!!?!
I hope you will have an option to skip it completly !!!
IMO, splash screen should be minimal, very minimal.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
you can go for image libaray and embed the gif image in your dialog
Caution: but image library make your program really big
-----------------------------
"I Think It Will Help"
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
If you create an animated .gif , you could use this[^] class to display it.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
hi,
does anyone know the difference between class 1 and class 2 in Bluetooth?
i know it's somthing about the range,but i need more details.
regards,
eli
|
|
|
|
|
quickly, class 2 is quite not used instead of classes 1 & 3.
of course, the range is in question (C1 is about 10 meters theoretical, while C3 can go to 100 meters, also theoretical). i said in theory because these lengths were mesured with nothing between the emiter and the receiver.
for the C2, i've heared of 10 to 20 meters.
there is also the power of emmision (that goes in pair with the range).
there are few details you could find by yourself (yes, i'm sure of it !! ). just google on "bluetooth class differences"... for example.
see you
TOXCCT >>> GEII power
|
|
|
|
|
I have a CDialog with a couple of CStatic objects.
In this CStatics I'm drawing a filled rectangle.
Now I want to be able to get the background color of the Dialog or the original color of the CStatic object to be able to fill the rectangle so that it want been seen without setting it visible false
I have tried to used GetSystemColorBrush but haven't been able to find the right color.
Can anyone plz help me
|
|
|
|
|
The common windows interface controls are drawn using your current colour scheme settings. Everything from the background colour of your dialog, colour of your menus, desktop etc can be queried using the GetSysColor()[^] API.
I Dream of Absolute Zero
|
|
|
|