Creating a Message File for NT Event Log in Visual Basic 
Author Message
 Creating a Message File for NT Event Log in Visual Basic

Does anyone know if its possible to create a message file for the NT Event
Log using Visual Basic.

I understand how to do this with C++, but I don't currently have access to a
C++ compiler and am wondering if there is some other way to do this in VB.

Any assistance would be greatly appreciated.

Thanks
Rob



Tue, 10 Jul 2001 03:00:00 GMT  
 Creating a Message File for NT Event Log in Visual Basic
Yes, it is, and very easy, too.

Just look up app.LogEvent and you will find what you need.  One thing to
keep in mind, though.  LogEvent DOES NOT work when you run in the VB IDE.
This was by design to keep the event log from getting filled up.  You'd have
to compile your app to see it work.

HTH,

Adam Israel, VB MCP

ICQ: 753398

Quote:

>Does anyone know if its possible to create a message file for the NT Event
>Log using Visual Basic.

>I understand how to do this with C++, but I don't currently have access to
a
>C++ compiler and am wondering if there is some other way to do this in VB.

>Any assistance would be greatly appreciated.

>Thanks
>Rob



Tue, 10 Jul 2001 03:00:00 GMT  
 Creating a Message File for NT Event Log in Visual Basic

|Does anyone know if its possible to create a message file for the NT
Event
|Log using Visual Basic.
|
|I understand how to do this with C++, but I don't currently have
access to a
|C++ compiler and am wondering if there is some other way to do this
in VB.
|

Check out http://www.netfokus.dk/vbadmincode/ , VB section, Event log.
 There are some samples there.

Just as a side point check out KB article Q154576 "HowTO: Write to the
NT Event Log from Visual Basic".  The article has some cool API code
that you can easily wrap into a class that works in the IDE and EXE.

;-) Cool
Hasta Luego
Adrian Maull [MCSD]



Tue, 10 Jul 2001 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Making an Event Log Message File in VB (NOT WRITING TO THE EVENT LOG)

2. Logging events to NT Event Log from VB5

3. Event Log: Writing to the NT Event Log

4. NT Service: An OLE Control for Creating Windows NT Services in Visual Basic (MSDN article)

5. NT Service: An OLE Control for Creating Windows NT Services in Visual Basic (MSDN article)

6. NT Service: An OLE Control for Creating Windows NT Services in Visual Basic (MSDN article)

7. Event Log Category Message File

8. Creating a Visual Basic Event in Visual C++

9. Reading NT Event Log files

10. Pass the NT account in a string to the NT event log

11. Accessing the NT Event Log in NT?

12. How to Retrieve Events For One Day From An Event Log on Windows 2000/NT

 

 
Powered by phpBB® Forum Software