|
Hi Gurus,
Does anyone know how windows eventviewer is implementing the export functionality. That is we can export the event list as tab delimited txt format or comma delimited csv file format. I didnt find any suitable functions for this in windows event logging api. The issue is we have to develop a custome eventviewer and these funtionalities has to be included. Any suggestions are most welcome.
Thanks
C++beginer
|
|
|
|
|
No function is there. I think EV is list control and MS provided functions to get value from list and record to file
Anil
|
|
|
|
|
So what your are saying is that the records in the event log is loaded to a list control (pardon me, i am not familiar with vc jargon) and from the list control its saved to a specific format. That is log entries are not directly exported?
C++beginer
|
|
|
|
|
There is an already existing API to read the even log records. You can use that API to read the event log records and export them into whatever data format is of your choosing. See OpenEventLog and ReadEventLog for starters.
I've seen better runs in my shorts! - Patches O'Houlihan
|
|
|
|
|
ahoy! I'm rather new to OOP and C++ programming in general, though i know some basics (keywords, some bits about classes, include files, and pointers)
recently ive begun to notice that C++ isnt just C++, but there seems to be different types of C++.
MFC for example, what is it? why is it so significant? is it just a library?
.NET, same question.
why would i want to use them to build my simple projects?
as of yet i'm only learning C++ for fun, though i may persue a career in programming in the near future (given post-secondary results)
any help to understand the concepts/point of MFC and .NET would be greatly appreciated. until then i just dont see why :/ what do they do? how do you use them? will any random compiler work with .net/mfc? are .net/mfc the same types of things?
I got a major case of brainsplode the other day trying to understand on my own. it doesnt work out ._.
|
|
|
|
|
Hi,
MFC is an application framework for writing Microsoft C/C++ and Visual C++ applications.
It increases the ease of use and definitely the speed with which an application is developed because you don't need to start from scratch each time.
If you have an application where you have to draw a window and just add a few buttons with background images and then perform some other complex GDI operations it would become tedious and will take some time. By using classes in MFC you can do it very easily and that's the whole point.
(event handlers etc (HANDCODED) just to make things sound complicated)
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
-- modified at 1:33 Monday 5th June, 2006
|
|
|
|
|
Thats right. MFC makes life really simple and fun too.
I too learnt VC++ on my own. And I knew only C before I started.
If you are really interested in learning, I suggest you buy a good book (there are plenty out there) and start from page 1... and keep at it. Once the initial barrier is broken, it becomes a smooth ride.
All the best.
Fortitudine Vinsinues!
(By endurance we conquer.)
|
|
|
|
|
Is it a suggestion for me?
Thanks for this one . I thought I didn't need this.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
oops! Sorry. I guess I pressed the wrong 'reply' button.
Tara
Fortitudine Vinsinues!
(By endurance we conquer)
|
|
|
|
|
I am working on a win32 program that requires users to create user names with passwords and log in. I assume that I need to create a file with user information and then read from it when the user tries to log in but have no idea how to go about doing so. Any help would be much appreciated. Thanks.
-Matt
|
|
|
|
|
fury 84 wrote: I assume that I need to create a file with user information and then read from it when the user tries to log in
That would be a bad assumption. It'd probably be better to assume that they'd probably want to type their credentials into a login dialog box.
-- modified at 23:25 Sunday 4th June, 2006
Using windows authentication that is. "Programming Server-Side Applications for Microsoft Windows 2000"
by Jeffrey Richter, Jason D. Clark
|
|
|
|
|
The core problem is, how do you hide this info so that someone can't just read it from your file system ? One potential way is to apply the MD5 hash to the password, and store the result, then do the same when checking the password. This is not foolproof, but it's far better than storing username/password pairs as plain text.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
fury 84 wrote: I am working on a win32 program that requires users to create user names with passwords and log in. I assume that I need to create a file with user information and then read from it when the user tries to log in but have no idea how to go about doing so. Any help would be much appreciated. Thanks.
Simplest Way to do so, is by using INI files! i.e. INI file is based on section, key and data, though it provide absolute security to your application, but for beginner level it will be easy go
try to create you INI structure some thing like this
[USERS]
noofuser=2
[USER1]
username=alok
password=alok
[USER2]
username=fury
password=fury
using this structure you can easily add user to your Application, without modifying application. here is list of ini wrapper class
http://www.codeproject.com/cpp/CIni.asp[^]
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hi,
Please can you tell me how INI file provides security. I mean, if you right-click on an ini file and select 'open with notepad' , it open and shows all the contents. So, how can it be used to save usernames and passwords.
Is there any other way? How do all those huge multi-user application securely store passwords?
Thanks.
Tara
Fortitudine Vinsinues!
|
|
|
|
|
TheinstruTara wrote: ou tell me how INI file provides security
Sorry i misquoted in my sentence, i want to say it doesn't provide Absolute Security but it is good for beginning
TheinstruTara wrote: Is there any other way? How do all those huge multi-user application securely store passwords?
actaully even Highly secure application store there information inthese file only , but they encrypt the data so no body able to read that. even Windows store there data in SAM files!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Encrypt....like...for example I write some code to convert the actual password to some normally un-understandable stuff and then store it.
Is that right? Is that one way of doing it?
Tara
Fortitudine Vinsinues!
|
|
|
|
|
TheinstruTara wrote: Encrypt....like...for example I write some code to convert the actual password to some normally un-understandable stuff and then store it.
Crytography for Example i.e. RC4 algorithm hashing etc
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Thanks a lot.
Fortitudine Vinsinues!
|
|
|
|
|
There is an X in the upper right corner. When the user clicks on
it, the program obviously closes.
How, in PreTranslateMessage(), can I determine that the user clicked
on that? Before any further action is taken, I want to quick ask
the user whether they want to save the contents before exiting. I
tried putting the command in other places and it just doesnt work
right.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle Brina (an overworked graduate student)
|
|
|
|
|
Handle the WM_CLOSE message. To stop the user closing don't pass the message on to the superclass of the window you're subclassing.
Steve
|
|
|
|
|
|
Check for WM_SYSCOMMAND and then SC_CLOSE .
When you click on those buttons on the title bar a WM_SYSCOMMAND is generated. Now what kind of event happened is determined by the wParam parameter. Check the wParam parameter to find out if X (SC_CLOSE ) was clicked.
Here is a sample done with WindowProc...
LRESULT CVolMacDlg::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
{
if( message == WM_SYSCOMMAND && wParam == SC_CLOSE )
{
if( MessageBox(_T( "Are you sure you want to quit?" ), _T( "Prompt?" ), MB_YESNO ) == IDNO)
return 0;
}
return CDialog::WindowProc(message, wParam, lParam);
} Well this is done with a dialog, it will work with views too but it will require some additional housekeeping too. Hope this helps.
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|
|
Hi ,
Check this out :-
(In Pretranslate Message)
if ( pMsg->message == WM_NCLBUTTONDOWN) // non client LButton Down
{
if ( pMsg->wParam == HTCLOSE) // the close button is going to be pressed
{
}
}
Regards,
FarPointer
|
|
|
|
|
I have a dialog box with the Title Bar setting set to False. This means that the Minimize Bar setting is False as well. This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?
Thank you!
|
|
|
|
|
Junyor wrote: This is why I can't minimize the application when I click on the icon task bar, but I would like this to happen.Any suggestions?
You can send a WM_SYSCOMMAND message with wParam parameter set to SC_MINIMIZE .
Nibu thomas
A Developer
Programming tips[^] My site[^]
|
|
|
|