The first thing you should do is to write a function which takes in input a time (MJD, for example) and outputs the x, y and z or l, b and r coordinates of the body for that time (both position and velocity).
Only after you coded that stuff, you can try to write your dll for that body.
Only after you coded that stuff, you can try to write your dll for that body.