|
Thanks for ur opinion..
But what I want to knkow is "Which Kernel Component is behind the scene for Event Logging process"? I mean how we can come to know that an event has occured without using the Event Viewer or using NotifyChangeEventLog() API?
|
|
|
|
|
Event Logging in Windows is works as a Windows Service. Run Services from Admin tool/control panal; U can see all services currently running in system. U can see a service called "Event Log", which write the events for windows.
See MSDN
BackupEventLog Saves the specified event log to a backup file.
ClearEventLog Clears the specified event log, and optionally saves the current copy of the logfile to a backup file.
CloseEventLog Closes a read handle to the specified event log.
DeregisterEventSource Closes a write handle to the specified event log.
GetEventLogInformation Retrieves information about the specified event log.
GetNumberOfEventLogRecords Retrieves the number of records in the specified event log.
GetOldestEventLogRecord Retrieves the absolute record number of the oldest record in the specified event log.
NotifyChangeEventLog Enables an application to receive notification when an event is written to the specified event logfile.
OpenBackupEventLog Opens a handle to a backup event log.
OpenEventLog Opens a handle to an event log.
ReadEventLog Reads a whole number of entries from the specified event log.
RegisterEventSource Retrieves a registered handle to an event log.
ReportEvent
|
|
|
|
|
Thanks for ur reply..
But I want to know how this mechanism of Event Logging is implemented internally in Windows Kernel? I dont want to use Event Viewer or NotifyChangeEventLog() API which helps me to identify when certain event occurs. Is there any way by which I can come to know about occurance of an Event??
|
|
|
|
|
How to execute a process virtually? That means without running an application i want to notify to OS that certain process is executed?
|
|
|
|
|
How would this help? I don't believe any windows os keeps any tracking info on if a program has ran so what would this add?? Please correct me if I am wrong...
John
|
|
|
|
|
Thanks for reply..
Certain applications & Processes logs events to respective logs like Application, System and Security logs. So is there any way that without executing certain application, we can log the event on behalf of that particular application.
I know there APIs available for this task, but they dont allow to write in SECURITY LOGS, and my task is to write in Security Logs. So how can this be solved??
|
|
|
|
|
Ahh, Now that makes sense to me. Sorry for wasting your time as I don't know the answer to the new question.
|
|
|
|
|
Hi,
Im my dialog i use combobox to list all OPC servers.
Each tiem when i click "ListServer" button in my dialog..it displays all registered servers in combo box.
Iam using OPCEnum to get server list,the function is
int NumberOfOPCServers (BOOL UseOPCENUM, LPCSTR MachineName);
In that list there are also unwanted server list which i dont have any work in that is also displayed.
Is there any option to not display this kind of unwanted servers.
-- modified at 1:33 Wednesday 26th July, 2006
|
|
|
|
|
if you dont need to these items why you add these item to your combobox
|
|
|
|
|
Hi,
In my MFC application i registered my server by using one clsid from GUID.exe as follows
SvrName = "EsimServer";
SvrDescr = "Prosimulator OPC Server";
UpdateRegistry ((BYTE *)&Svr_Clsid, SvrName, SvrDescr, HelpPath);
I gave clsid in top of my coding.
My problem is in same application i want to register different servers.
That is EsimServer1,EsimServer2,EsimServer3...
Can i do this by using the same clsid for all server register.
Anu
|
|
|
|
|
you have to use separate CLSID for each com component.
in this way u can register multiple servers
Sudeesh
|
|
|
|
|
Generally we have seen that when put out mouse over any control it displays some description about that after some time How can we implement that in our VC++ environment Kindly guide me regarding this
Thanx in advance
|
|
|
|
|
|
abhiku28 wrote:
mouse over any control it displays some description
This should help[^]
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Hello everyone!
I spent like 10 mins trying to fix a function, but it didn't make sense... The problem was that, I was mixing 2 other funcs into that one, one was bool , the other was int ... It had bool type, but it returned int , so that was the problem, 0 = false !
If 0 is the "good" value for int , isn't bool backwards?
Windows Calculator told me I will die at 28.
|
|
|
|
|
I'm not sure what it is that you're saying here, but an int can evaluate to bool automatically, 0 is false. How is 0 'the good value for int' ???
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
true = !false;
false = !true;
So, if true = 1, !true = 0. If false = 0, !false = 1. At least this holds true for VC6, not sure about other languages or compilers. (I know in icky VB, True=-1 and False=0).
Not sure what you mean by, 0 is the "good" value for int...
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
Hi,
you didn't mention the functions. Therefore this is just a wild guess.
There are many functions, that return an int to indicate success or failure. Usually a 0 means a success and everything else indicates an error. This is typically done, when throwing an exception is not an option.
Regards,
Tim
|
|
|
|
|
Hmm... In VC++ 2003, it's like Steve said it was like in VB, true = 1 , false = 0 ... Or am I wrong? Maybe returning int on a bool func was the mistake?
Windows Calculator told me I will die at 28.
|
|
|
|
|
Kixdemp wrote: In VC++ 2003, it's like Steve said it was like in VB, true = 1, false = 0... Or am I wrong?
This is correct.
Kixdemp wrote: Maybe returning int on a bool func was the mistake?
From your description, I don't understand what you are doing. Can you provide a short code sample?
Regards,
Tim
|
|
|
|
|
Actually in VB true is -1 and false is 0. (because they used bitwise AND to test for it i think)
BOOL (which is a typedef for int) should be either TRUE (1) or FALSE (0). Why are you returning int if the return type is bool? It has to do unneccesary conversions.
|
|
|
|
|
The return values for APIs can be:
int or long or DWORD : 0 = success (or ERROR_SUCCESS or NO_ERROR , all defined as 0), non-zero = failure.
BOOL (not bool ): FALSE (zero) = failure, non-zero = success. Note that with BOOL, any non-zero value should be interpreted as "true", therefore never test a BOOL against TRUE , only against FALSE .
HRESULT : Use the SUCCEEDED and FAILED macros to test for success/failure.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
Kixdemp wrote: If 0 is the "good" value for int, isn't bool backwards?
There's only one reason for success, but there can be several for failure. That's why a function typically returns 0 for success.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi All,
I need to develop a client program with C++/MFC that let user can dowload the file from my Servlet Server. I mean from C++ program we can send a POST or GET to servlet server to send the data and can download a file.
Any help in this.
Thank in advance!
|
|
|
|
|