By using the example programs I can get the image I want by using the following
dcraw_emu -w -T
I want to be able to to this in a program so that I can do it in memory and not have to write it to the disk. To do this I wanted to replicate the draw_emu command line first, then change it to everything happening in memory.
But the code I have doesn't seem to use the camera white balance or output to TIFF.
#define OUT libRaw.imgdata.params
OUT.use_camera_wb = 1;
OUT.output_tiff = 1;
ret = libRaw.open_file(input);
//unpack the image
ret = libRaw.unpack();
ret = libRaw.dcraw_process();
ret = libRaw.dcraw_ppm_tiff_writer(output);