Browse - programming tips - get windows handle from standard fileDate: 2008jan2 Platform: win32 Language: C Q. How can I get a Windows HANDLE from a standard C FILE * ? A. Like this: main() { FILE *f; HANDLE handle; f = fopen("myfile.txt", "r"); handle = (HANDLE) _get_osfhandle(fileno(f)); } Add a commentSign in to add a comment |