Hi, i have an application that run JVM, i am redirecting stdout, i have already done it, with freopen, using process, and running exe, and redirecting.

my question is, I need to omit the file on freopen, I wonder if its posible to make a virtual file

I am using this functions:

Code:
err = freopen_s(&tmpF,tmpnam( sNombre), "w+", stdout);
but i canīt find or read the temp file any idea

here its all the code
Code:
FILE *tmpF;
	errno_t err;
	JNIEnv* env;
	char acumulador[81];
	char sNombre[L_tmpnam];
	
	tmpfile_s(&tmpF);	
	
	err = freopen_s(&tmpF,tmpnam( sNombre), "w+", stdout);
	
	env = create_vm();	
	invoke_class( env );

	getchar();
	printf("Hola %s",fgets(acumulador,80,tmpF));

	getchar();