Link to home
Start Free TrialLog in
Avatar of hirnsieb
hirnsieb

asked on

FILE* Pointer frol CFile object?

I have integrated some external code in my project that wants me to write my data into a CFile (CSharedFile to be exact). But since my data model requires a FILE* pointer to for its IO-operations I wondered if there's any way to get a FILE* pointer from the CFile object.

I think that the CFile class is simply a wrapper for the fopen, fwrite, fread, etc. functions. Right? So there should be a way.

I tried to get the file handle (with the HANDLE operator of CFile) and cast it into FILE*, but the handle I got was invalid (0xffffffff).

Grateful for any ideas.
ASKER CERTIFIED SOLUTION
Avatar of Karl Heinz Kremer
Karl Heinz Kremer
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of hirnsieb
hirnsieb

ASKER

the link you provided was very useful, although i now know that what i wanted to do is impossible. so i altered my code. thanks anyway!