Need........Help with IPO Code

Hi All,
I am trying to write a vc++ dll to implement my functions, that are related to the blender IPO characteristics such as the numberofinterpolators available in blender, their names and whether they allow fractional frames,I can find them in general, but i want to implement a function createEnvelop that creeates a new envelop in Blender, and this envelop will have arguments, other functions writekey which writes a key value for the envelop created.

I will be thankful if you can help me to find out the exact code in Blender that points to the structure I need so that I can implement the above functions