@acer : Thanks a lot for your post, and sorry for late reply.
I was able to make the fortran dll work with REF keyword. I, however needed to remove the word 'FORTRAN' from the first call to define_external, as the FORTRAN option doesnt support REF.
This doesnt change any part of the rest of the workflow though, as we are customizing the resulting wrapper anyway (which is unaffected with the FORTRAN option in define_external call).
So finally, what works is:
multiply(a1, a2, a3); // in mwrap_multiply.c, even when a3 is defined as FLOAT64 * as we need to pass the address to the fortran function
And in maple
mult(2., 3., 'mult1');
However, I found that this only works with 'double' and not 'float'. Although, this isn't a Maple issue, float wasn't working even with my C driver, so a question for stackoverflow.
Thanks for your help. Will post results with more complicated DLLs.