Hi, I am trying to convert an LPWSTR, specifically from an OPENFILENAME struct, to a char *.

so I have my code it looks like

OPENFILENAME ofn;

...

char *fname = (char *)ofn.lpstrFile; //this is what I tried and it didnt work


so pretty much I was wondering if there was some simple way of taking the file path from my OPENFILENAME struct and putting it in a useful char *.