Change VirtualFile direction

Hello,

Sometimes, one needs to reuse a file generated by a module in another one. A typical case is generating a cpt file with grd2cpt to be used later with grdimage. When using the API, we can first open a VirtualFile in GMT_OUT mode to give a name (->name) to grd2cpt. But can this name be used (that is in GMT_IN mode) for the -C option of grdimage?
Thanks for your Help.

Olivier

Should be OK to do via GMT_Init_VirtualFile