Jump to content

Recommended Posts

Posted

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?


Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

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