|
Cool thanx...i'll check em out!
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Anonymous wrote:
I want to encrypt the password & store it in registry.Also i should be able to decrypt the string.
How can i do that?
For a different approach, consider this... I never use encryption for things like Passwords in applications: instead, I use a one-way hash (like MD5) and store the hash instead.
So basically, when the user sets a password, you take the password, calculate a hash from it, and store the calcualted hash value in the registry/database/wherever/whatever.
Later on, when you need to verify a password, you take the entered password, calculate a hash from it, and then compare it aganist the previously stored hash value.
BYW: This method also allows you to use passwords of any length, because the hash value (in the case of MD5) is always the same length.
Peace!
-=- James.
|
|
|
|
|
I have Formview so it does not support printing,I want when user click on one of menu print preview open and user print it.How can I do that? I know how to write in print preview but donna know how to open it.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I am looking for a way to display system date and time in my Win32 application?? any suggestions.
|
|
|
|
|
You can use GetSystemTime and/or GetLocalTime
Nish
Has anyone seen my sig?
|
|
|
|
|
Also if you happen to be using MFC you could use CTime.
-Jack
To an optimist the glass is half full.
To a pessimist the glass is half empty.
To a programmer the glass is twice as big as it needs to be.
|
|
|
|
|
Thx for the response. Now, if I have to keep displaying accurate time, I will have to invoke a thread to repeatedly update it, right?? Please tell me if I am thinking on the right lines
|
|
|
|
|
girishc wrote:
Now, if I have to keep displaying accurate time, I will have to invoke a thread to repeatedly update it, right??
Yes, that's what you'll need to do. Need not have a separate thread. Just start a timer.
Nish
Has anyone seen my sig?
|
|
|
|
|
When updating the displayed time, be sure to update the displayed string only if it's (the string) different. Otherwise you'll see unnecessary flicker. If you're using a timer (as Nish suggested), set the interval to slightly less than one second.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Wont setting the timer to less than a sec. hog up CPU and my program might not be able to do anything else?? or is it ok??
|
|
|
|
|
No it won't hog up the CPU. WM_TIMER are among the lowest priority messages and are automatically compacted by Windows. That is, if you receive 4 WM_TIMER messages for the same timer, Windows will automatically compress them into a single message. Try it, you'll see!
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
I wanna print some text.I have formview so I don't wanna use OnDraw().In my OnPrint(),I don't know how can I check if it reaches to the end of page ,and how to set the next page true.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
I think I find it.m_rectDraw and m_bContinuePrinting are the things I need,I guess.
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Hello.
I have a cmd line process that returns a value via the command interpreter (using sytem()). How do I get the same result value using Createprocess()?
|
|
|
|
|
If I follow you correctly, you're creating a process and want to get it's exit code, right?
HANDLE hProcess = CreateProcess(...);
WaitForSingleObject(hProcess, INFINITE); // Make sure it's done
DWORD dwExitCode;
GetExitCodeProcess(hProcess, &dwExitCode);
If the process is still active, dwExitCode == STILL_ACTIVE.
Hope this helps.
|
|
|
|
|
sultan_of_6string wrote:
WaitForSingleObject(hProcess, INFINITE); // Make sure it's done
sultan_of_6string wrote:
If the process is still active, dwExitCode == STILL_ACTIVE.
It wont be active as you are waiting INFINITEly
Nish
Has anyone seen my sig?
|
|
|
|
|
I know. Just telling you.
|
|
|
|
|
sultan_of_6string wrote:
I know. Just telling you.
Ok, thanks!
Nish
Has anyone seen my sig?
|
|
|
|
|
Thanks.
Just what I needed.
|
|
|
|
|
How do I add a DLL to a project. I created the DLL so that is not a problem. I have exported the appropriate functions but I don't know how to add it to the project and load it etc. Thanks if you can help.
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
project-->properties---->Linker--->additional dependenceis
Here add your .lib
Mazy
"So,so you think you can tell,
Heaven from Hell,
Blue skies from pain,...
How I wish,how I wish you were here." Wish You Were Here-Pink Floyd-1975
|
|
|
|
|
Thanks, I found examples of how to export functions but not how to import it into a project. Thanks Again
- Matt Newman / Anti-Linux Activist
-Sonork ID: 100.11179:BestSnowman
†
|
|
|
|
|
It's seem that the App's m_pszAppName and m_pszExeName member only contain the module name,is there a way to get the App's full path?
Scratch
|
|
|
|
|
GetModuleFileName is one way to get it. GetFullPathName is another.
|
|
|
|
|
A Q&D way that has never failed (for me, at least) is to use value of "CWinApp::m_pszHelpFilePath", and just replace the extension with your app's extension (usually "EXE").
Peace!
-=- James.
|
|
|
|