|
Maybe Chris should add a feature so that you cant modify/delete a post once somebody has replied to that post.
Nish
|
|
|
|
|
> However, there was no point in deleting the original post.
That depends on your POV. *I* saw a great need to delete the post, to help prevent similar responses.
> In fact, it's damn irritating when someone deletes a post after other people
> have started responding to it.
It was deleted after the first reply, and I actually expected the thread to go with it (my first 'delete post' attempt).
Because others saw fit to continue the thread is not my doing.
Peace!
-=- James.
|
|
|
|
|
I didn't mean any offense, James. Your original post said that the error occured on a specific line of the C-runtime library, and ended with the statement, "and was discovered by [name deleted]."
That was the end of your post. There was no indication that you wanted to discuss it further or talk about possible solutions. At first blush, it appeared to be a "Me, too!" post instead of a coherant discussion. You didn't even mention the name of the person who discovered where the bug lay. That is more of a tease, than anything else.
If you would like to repost your original message, but provide better direction for the discussion that will ensue, I, and probably others, would be interested in examining this obvious shortcoming of Microsoft's implementation of the Standard C Library!
--
Paul
"I drank... WHAT?"
|
|
|
|
|
> [...] and ended with the statement, "and was discovered by [name deleted]."
> That was the end of your post. There was no indication that you wanted to
> discuss it further or talk about possible solutions.
That is because the post was modified after I got the first reply. It also previously ended with the single word "Thoughts?".
> I, and probably others, would be interested in examining this obvious shortcoming
> of Microsoft's implementation of the Standard C Library!
IIRC, the underlying cause is actually in an underlying Win32 function used by the C-RTL implementation.
The problem was was researched and discovered by someone else whose name was on the original post. I removed it after the first reply, because there was no need for that person to be getting similar emails.
Peace!
-=- James.
|
|
|
|
|
Hi,
I need to manipulate the resource buttons for the file list view setting(list,details,large/small icons) in the standard file open dialog so as to remember the settings.
So, anyone give me the handle to these resources.
Thanks
Paritosh.
|
|
|
|
|
- Why should we use global data ( #pragma data_seg ... ...) in the "MouseProc" function to store information?
- For example, I use MouseProc to get other process's main window title. I implement MouseProc in a Dll. And store the title (in MouseProc) in a global variable (#pragma data_seg ... ...).
- I do not know why should we store other process's main window title in a global variable. Like what I have done.
- Can you help? Can you show me an example?
- Have a nice weekend,
Maer
|
|
|
|
|
- Where should I implement function "MouseProc" in a dll? In a class or as a dll global function?
How to do it?
- Can you help?
- Regards,
Maer
|
|
|
|
|
|
- Thanks pal!
- I try the URL you mentioned, but I can not open it.
-Can you help?
- Regards,
Maer
|
|
|
|
|
Seems to be something wrong with the CP servers.
You can get the same article from Dr. Newcomer's site at http://www3.pgh.net/~newcomer/hooks.htm
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
- Thanks pal!
- I have got the great article. It will be a lot help.
- Still have a stupid question, what means "CP" in your reply? (I am a newbie.)
- Have a nice weekend,
Maer
|
|
|
|
|
CP = Code Project
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
- Thanks pal!
- Have a nice day,
Maer
|
|
|
|
|
How can I Create a ListView with draggable icons?
(i mean that I will able to change icons position in the list by draggin them)
|
|
|
|
|
How do I format a number to kb?
//--------------------------------------
__int64 = sizeWritten;
long sw = sizeWritten / 1024;
sprintf( szBuffer, "%d Kb", sw);
//--------------------------------------
now returns something like 1234567 Kb
but i want it to return 1.234.567 Kb
is there an easy way or function to do this?
TIA
|
|
|
|
|
I dont think there is a ready-made function for that. But you can write your own huh?
Nish
p.s. I might be wrong though. There might be some obscure function.
|
|
|
|
|
The STL locale support includes functions to format numbers with correct grouping and and separators. You are right, they are obscure and nearly undocumented in MSVC++.
|
|
|
|
|
|
Amazing Michael
You sure do know all of them API calls don't you!
A for you Michael
Nish
|
|
|
|
|
Thanks for the feedback so far,
Came up with the following, how does this look?
any input, comment welcome...
//----------------------------------------------------------------
#include "string.h"
char szOutput[20];
char* formatKB(long input)
{
char szInput[20];
int j=0, k=0;
sprintf( szInput, "%d", input);
_strrev(szInput);
for (int i = 0; i < strlen(szInput); i +=3)
{
strncpy( szOutput + k, szInput + j, 3);
if (j < strlen(szInput) - 3 )
strcat( szOutput , ".");
j+=3;
k+=4;
}
_strrev(szOutput);
return szOutput;
}
int main(int argc, char* argv[])
{
long sizeWritten = 1234567890;
printf("%s Kb\n", formatKB(sizeWritten));
return 0;
}
//----------------------------------------------------------------
Xenion
|
|
|
|
|
Okay, I wrote a perl script for a signup area in my MFC application. When the user fills in the data for the perl script on my webpage, it creates a file in the settlers.net/snetdownload/users folder called $username.$password - $username being the data the person entered into the username field and $password being the password the user entered into the field.
Okay, now in my program. I have 2 edit controls. m_username and m_password. Okay, say in my perl script I entered Ashman as the username and cheese as the password it would create a file, Ashman.cheese
I need my program to check that the I have put in Ashman in the username and cheese in the password field and then validate that the file exists with the server. If I put in Ashman as the username and choose as the password, it will not find the file ashman.choose so it will say, Could not login.
Get my drift?
Ashman
|
|
|
|
|
I don't do perl, but I know a thing or two about security and I can't see much point in a password at all if its going to be so easy to see what it is.
Assuming your user names have to be unique anyway you do not need the password to be on display at all.
I would pass the username and password to the system to do the validation, then if your program wants to know who is logged in it can ask.
We do it for the joy of seeing the users struggle.
|
|
|
|
|
- In MSDN, it is said TLS index is stored in a global variable.
- I do not know whether it is a process-wide global variable or a thread-wide variable?
- Can you help?
- Regards,
Maer
|
|
|
|
|
If I understand your question correctly, then...
The TLS *index* ("slot" location) is a process-wide global variable. The value that is stored in the TLS (slot) location referenced by the index is Thread-specific.
-=- James.
|
|
|
|
|
- Thanks pal!
- Your reply clarifies my doubts.
- Have a nice weekend,
Maer
|
|
|
|