Does anyone know how to write an event into NT Event Log 
Author Message
 Does anyone know how to write an event into NT Event Log

Hi all,

Private Sub Command1_Click()
App.LogEvent "HelloWorld", vbLogEventTypeInformation
End Sub

I have tried this but doesn't seem to work .. got any suggestions ?

Thanks in advance

Kev



Sun, 21 Apr 2002 03:00:00 GMT  
 Does anyone know how to write an event into NT Event Log
LogEvent works only when used inside an ActiveX "unattended" component.
Instead of using the Win32 API, a straightforward solution would be to wrap
this function in the method of an ActiveX DLL that you can then use from
your main source to log events...

--
Patrice Scribe


Quote:
> Hi all,

> Private Sub Command1_Click()
> App.LogEvent "HelloWorld", vbLogEventTypeInformation
> End Sub

> I have tried this but doesn't seem to work .. got any suggestions ?

> Thanks in advance

> Kev



Sun, 21 Apr 2002 03:00:00 GMT  
 Does anyone know how to write an event into NT Event Log
Simply compile it, Kevin. App.LogEvent does not work in IDE but in compiled
components. I think it is not limited only to unattended components. Another
case is MessageBox, in unattended components it works as application log
event in type of Information. This behavior is described in documentation to
VB.

Vasek


Quote:
> Hi all,

> Private Sub Command1_Click()
> App.LogEvent "HelloWorld", vbLogEventTypeInformation
> End Sub

> I have tried this but doesn't seem to work .. got any suggestions ?

> Thanks in advance

> Kev



Sun, 21 Apr 2002 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Event Log: Writing to the NT Event Log

2. Has anyone written to the NT Event Log?

3. Writing events to the NT Event Log

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

5. Logging events to NT Event Log from VB5

6. Write events to the event log ?

7. Write to NT event log

8. Writing to the Windows NT Event Log - Example please

9. Write NT Event Log in VB 5

10. Write to NT's Event Log

11. Writing to NT Event Logs

12. Write errors at Windows Nt Event Log

 

 
Powered by phpBB® Forum Software