Using the C API: Two Approaches

Using the C API, you can:

You can use the same basic method to perform both of these tasks.