The easiest way to load the DLL is to link against the DLL when building your application. In this way, your application will automatically load the DLL when it starts.
The following code snippets describe how to load and call one function of the nrfjprog DLL. Remember that error checking should be done in each step of the code, but for simplicity this is not illustrated in the following code snippets.