Jump to content

Clear Vista Event Logs in VB


Recommended Posts

I am having trouble clearing the event logs in Vista using Visual Basic. I can not wait to use the new .NET framework and this code must be done in VB. I am trying to use the Windows Event Log functions from "wevtapi.lib" in Visual basic. The functions are:

EVT_HANDLE WINAPI EvtOpenChannelEnum(

EVT_HANDLE Session,

DWORD Flags

);

http://msdn2.microsoft.com/en-us/library/aa385437.aspx

BOOL WINAPI EvtNextChannelPath(

EVT_HANDLE ChannelEnum,

DWORD ChannelPathBufferSize,

LPWSTR ChannelPathBuffer,

PDWORD ChannelPathBufferUsed

);

http://msdn2.microsoft.com/en-us/library/aa385412.aspx

BOOL WINAPI EvtClearLog(

EVT_HANDLE Session,

LPCWSTR ChannelPath,

LPCWSTR TargetFilePath,

DWORD Flags

);

http://msdn2.microsoft.com/en-us/library/aa385340.aspx

Can someone please show me how to declare these functions and their types in VB?

Link to comment
Share on other sites


Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...