Page 1 of 1 1
Topic Options
#98916 - 2003-03-01 01:08 AM Event Logging with Custom Message DLL
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
Recently I created an MFC Message DLL that handles "generic" kixtart messages with an event source of "KiXtart". This allows one to use the KiXtart function LogEvent() without getting back the standard "message dll" error and without using another more generic source type.

Not sure if anyone out there has already duplicated this effort or not. If so, I'm unable to find it. If this is something that the KiXtart community doesn't yet have and is something that would be considered worthwhile I'd be happy to post it up somewhere.
_________________________
Stevie

Top
#98917 - 2003-03-01 01:19 AM Re: Event Logging with Custom Message DLL
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Dear Steve,

At the moment there isn't any solution for those unwanted parts in the eventlog.
You can mail it to us and after pore over your contribution we are prepared to
put in our site.

Please send it as a ZIP file to us. Please put also possible available documen-
tion to it.

Our mail address is scripting@wanadoo.nl
greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#98918 - 2003-03-01 01:28 AM Re: Event Logging with Custom Message DLL
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
btw: possible that we will also included it in our installation packages.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#98919 - 2003-03-01 01:33 AM Re: Event Logging with Custom Message DLL
Lonkero Administrator Offline
KiX Master Guru
*****

Registered: 2001-06-05
Posts: 22346
Loc: OK
possible that it's even included in kix package [Wink]

anyway, sure, wanted that is!
_________________________
!

download KiXnet

Top
#98920 - 2003-03-01 01:51 AM Re: Event Logging with Custom Message DLL
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
Need to do a little more testing on NT/2000. XP looks fine. As soon as it's done (maybe tonight if VMWare isn't acting up) I'll go ahead and post it. Thanks.
_________________________
Stevie

Top
#98921 - 2003-03-01 03:50 AM Re: Event Logging with Custom Message DLL
MCA Offline
KiX Supporter
*****

Registered: 2000-04-28
Posts: 5152
Loc: Netherlands, EU
Ok, Steve.
We will see it the coming days.
success & greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA

Top
#98922 - 2003-03-02 04:41 PM Re: Event Logging with Custom Message DLL
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
Ok, it's up and running. Remember, this is just a BETA so it's really up to you guys to figure out the best way to implement this thing for real as far as what standard error codes to include, etc. The download page is http://www.kixscripts.com/resources/eventlogdll.asp
_________________________
Stevie

Top
#98923 - 2003-03-02 05:17 PM Re: Event Logging with Custom Message DLL
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
Steve,
Thanks for the contribution. The non-descript error messages have been one of my pet peeves for some time.

I have often wondered what would be involved in providing proper messages and if it could be done without having to install a DLL. Since I am not a programmer, I must continue to wonder. Do you know if it would be possible for Ruud to include descriptive messages in the binaries that would not have to be installed requiring admin rights?
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#98924 - 2003-03-02 05:31 PM Re: Event Logging with Custom Message DLL
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
It's certainly possible to add that functionality to kixtart itself, the only issues would be Ruud's time and the fact that it would necessarily bump up the size of kix32.

Since this DLL uses the same source name as kix itself, then it would be very easy to add common event id numbers that kixtart pops up, and if necessary, provide more information.

For example, the dreaded Event ID 1312, I could add info to the DLL to say, "This event occurrs most commonly because KiXtart is being run by a service or scheduler. It can be safely ignored." That way people would have a better understanding of the message, etc.

Also, the dll isn't registered. It just sits there waiting to be used by Event Viewer. So really it can go anywhere on the system. The only gotcha would be that the registry changes are in HKLM and would likely require someone with elevated privileges to make them.
_________________________
Stevie

Top
#98925 - 2003-03-02 05:55 PM Re: Event Logging with Custom Message DLL
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Steve: Can you please post the HKLM registry changes, so that we can script a .DLL update instead of using your installer?
_________________________
There are two types of vessels, submarines and targets.

Top
#98926 - 2003-03-02 06:18 PM Re: Event Logging with Custom Message DLL
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
Sure thing.

One key is added at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog\Application\KiXtart

There are two entries in that key,

'EventMessageFile', REG_EXPAND_SZ, "%windir%\system32\kixtartmsgs.dll"

'TypesSupported', REG_DWORD, 0x07

That's it.

Also, you can use the /verysilent install switch with the installer so that nothing is displayed on screen. Just another option...

[ 05. March 2003, 20:54: Message edited by: Steve B ]
_________________________
Stevie

Top
#98927 - 2003-03-02 06:19 PM Re: Event Logging with Custom Message DLL
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
Just remember if you're scripting your own install, don't register the dll. It's not supposed to be registered and it'll just give you an error.
_________________________
Stevie

Top
#98928 - 2003-03-03 11:07 PM Re: Event Logging with Custom Message DLL
Stevie Offline
Starting to like KiXtart
*****

Registered: 2002-01-09
Posts: 199
Assuming there are interested parties out there and a willing volunteer--if someone can list out some of the common kixtart runtime error numbers and real-world kix explanations for them I can update these in the message file. 1312, 1332, 632 and 7000 seem pretty popular but I'm sure there are others.
_________________________
Stevie

Top
Page 1 of 1 1


Moderator:  Arend_, Allen, Jochen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 657 anonymous users online.
Newest Members
M_Moore, BeeEm, min_seow, Audio, Hoschi
17883 Registered Users

Generated in 0.096 seconds in which 0.071 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org