|
Did you try a simple Google search[^]?
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->ßRÅhmmÃ<-·´¯`·.
|
|
|
|
|
I tried that also, but didn't get any solution.
-Sachin
|
|
|
|
|
Sachinpatole wrote: I tried that also, but didn't get any solution.
You are lying...
- NS -
|
|
|
|
|
Sachinpatole wrote: I tried that also, but didn't get any solution.
So google is not your friend.;)
|
|
|
|
|
The compiler "knows" the sizes of all types that are native, or have been declared up to that point. It merely substitutes an integer constant in place of the sizeof expression at compile-time. Unless you're talking about reflection or RTTI (run-time type identification), all the size information is known at compile time, so there is no run-time involvement; just a simple substitution. Much like using a #define or a const.
Hope this helps.
David
|
|
|
|
|
I do not know a way to get all exceptions.
try
{
}
catch(CException *e){}
is not working for all exceptions. If I put catch(...) it is ok but I cannot get the error message this way.
Do you know what I can put in the catch () so that I can handle all exceptions having their messages.
Thank you!
modified 8-Mar-17 3:46am.
|
|
|
|
|
In order to catch everything, you need to look at the docs for the function which is throwing the exception and then add a catch statement specific for that.
try<br />
{<br />
}<br />
catch(CException *e)<br />
{<br />
}<br />
catch(LPTSTR szErr)<br />
{<br />
}<br />
catch(...)<br />
{<br />
}
Waldermort
|
|
|
|
|
Have u tried using
"try-finally-statements"
-Sachin
|
|
|
|
|
Exactly how does that get the text of the exception being thrown?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Im not sure but I think some times ago I saw a code on the http://www.koders.com about get exceptions see this site.
|
|
|
|
|
I'm trying to enable the SE_TCB_NAME privilage within the token of my process, but for some reason after the call to AdjustTokenPrivilages() GetLastError returns ERROR_NOT_ALL_ASSIGNED. My program is running in elevated mode so I can't understand why I am unable to set this.
Is there something I am missing?
Waldermort
|
|
|
|
|
The AdjustTokenPrivileges function cannot add new privileges to the access token. It can only enable or disable the token's existing privileges. To determine the token's privileges, call the GetTokenInformation function.
-Sachin
|
|
|
|
|
in some of the source codes, i came across defining a function like this.
int function(int a,...);
can any body explain me the significance and use of the above convention?
thanks.
-- modified at 3:39 Wednesday 3rd October, 2007
|
|
|
|
|
See here[^]. Basically it's used to define a function which takes a variable amount of arguments.
Steve
|
|
|
|
|
thank you stephen,
but can you narrate an example, where this sort of convention can be used.
|
|
|
|
|
There's sample code at the bottom of the link. printf and sprintf use this construct: both functions take a variable number of arguments.
Steve
|
|
|
|
|
so nice of you for the example.
i will try to implement it in my applications and post back if any more doubts are there.
thank you.
|
|
|
|
|
Microsoft has forgotten to include the standard va_copy() function/macro. See http://www.codeproject.com/script/comments/forums.asp?forumid=1647&mpp=50&select=2255221&df=100&fr=51[^]
va_copy() is required in a function like vprintf (which is probably how printf is actually implemented on most systems:
int printf( const char* format, ... )
{
int ret;
va_list args;
va_start( args, format );
ret = vprintf( format, args );
va_end( args );
return ret;
}
)
but unlike vprintf, you need to traverse the va_list more than once. There is no portable way to restart the argument traversal process without the va_copy() macro.
In my program, I went ahead and wrote:
#include <stdarg.h>
#ifndef va_copy
# define va_copy(dest,src) ((dest)=(src))
#endif
This may be confusing to a newbie to the subject, but if you program long enough, and you try to factor your code correctly, you're going to run into this situation.
David
|
|
|
|
|
Hi,
How long is the maximum popup time that can be set to a tooltip?
Thanks in advance.
- NS -
|
|
|
|
|
NS17 wrote: maximum popup time
I think that there isn't any limit
Russell
|
|
|
|
|
From my experiments I understood that it cant be set more than 0x7fff (signed short int max)
- NS -
|
|
|
|
|
|
TTM_SETDELAYTIME with TTDT_AUTOPOP flag
- NS -
|
|
|
|
|
Oh yes, got it.
Exactly, I found 7FFF milliseconds too.
If you need more I think that you need a custom tolltip that use a timer.
Russell
|
|
|
|
|
Less the code, lesser the bugs...
- NS -
|
|
|
|