Event Log Reading in C

I'm using the code mentioned here:

Querying for Event Information

There is a part in the program which says :

// Get the provider DLL that contains the string resources for the
// category strings, event message strings, and parameter insert strings.
// For this example, the path to the DLL is hardcoded but typically,
// you would read the CategoryMessageFile, EventMessageFile, and 
// ParameterMessageFile registry values under the source's registry key located 
// under \SYSTEM\CurrentControlSet\Services\Eventlog\Application in
// the HKLM registry hive. In this example, all resources are included in
// the same resource-only DLL.

How can I do this using C code? Also, how can I get the providers for event logs such as Security.evtx?