use of com.sun.jna.platform.win32.Winevt.EVT_HANDLE in project jna by java-native-access.
the class WevtapiTest method testEvtOpenChannelConfig.
public void testEvtOpenChannelConfig() throws Exception {
EVT_HANDLE channelHandle = null;
try {
channelHandle = Wevtapi.INSTANCE.EvtOpenChannelConfig(null, "Application", 0);
assertNotNull(channelHandle);
Winevt.EVT_VARIANT evtVariant = WevtapiUtil.EvtGetChannelConfigProperty(channelHandle, Winevt.EVT_CHANNEL_CONFIG_PROPERTY_ID.EvtChannelConfigClassicEventlog);
assertThat(((WinDef.BOOL) evtVariant.getValue()).booleanValue(), is(true));
} finally {
if (channelHandle != null) {
Wevtapi.INSTANCE.EvtClose(channelHandle);
}
}
}
Aggregations