How do I read Windows Event Log field names using JNA?
<p>I am using JNA to read Windows event logs. I can get a fair amount of data out of each record but I can't quite get the field names. </p>

<p>To read logs I am doing</p>

<pre><code>EventLogIterator iter = new EventLogIterator("Security");
while(iter.hasNext()) {
    EventLogRecord record = iter.next();
    System.out.println("Event ID: " + record.getEventId()
        + ", Event Type: " + record.getType()
        + ", Event Source: " + record.getSource());
    String strings[] = record.getStrings();
    for(String str : strings) {
        System.out.println(str);
    }
}
</code></pre>

<p>I can get data like the id, type, and source easily. Then I can get the list of strings which may be for SubjectUserSid, SubjectUserName, etc. </p>

<p>I've been trying to get the data that I want with the field names. Is there an easy way to extract the field names/headers for each of the strings from record.getStrings()? I noticed there is a byte[] data variable in the record. I have tried to read this but I haven't been able to get any useful information from it. I know I can get the data length and offset for certain variables which I think I could extract the data that I want that way but I was wondering if that was correct or if there was an easier way.</p>