I'm not sure this is even valid when used within a C program, assume some code like this:
FILE *f = 0;
openFile(f,"happy.txt","rw");
printf("%p\n",f);
"f" will always be "0" even if the fopen works fine. You won't be able to use your "closeFile" because you've lost the address to the valid FILE*. This is because you are passing an address, but you are not changing the value at that address, instead you probably want something like this:
long openFile(File **fp, char *filename, char *rw)
{ *fp=fopen(filename, "r"); return 0; }
and then...
FILE *f;
openFILE(&f, "happy.txt", "r");
printf("%p\n",f);
will work as you expect it to.
Take a look at "extcode.h" in the "cintools" of your LabVIEW install, it has sever functions that will co
nvert strings to paths, paths to refnums, refnums to (internal, undocumented) LabVIEW file descriptors. It will also has functions that you can use to read and write to files opened by LabVIEW.