Click to See Complete Forum and Search --> : File i/o in win mobile 5


irb4
September 22nd, 2006, 12:28 AM
Win ce directory structure confirmed:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnppcgen/html/ppc_io.asp

So I code like this with evc++ 2002



#include <stdio.h>
FILE *fp;

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow){
fp=fopen("\Temp\agon.doc", "a");




nothing in \Temp file.....




#include <stdio.h>
FILE *fp;

BOOL InitInstance(HINSTANCE hInstance, int nCmdShow){
fp=_wfopen(L"\Temp\agon.doc", L"a");




nothing in \Temp file.....

Anything wrong with my code?

humptydumpty
September 22nd, 2006, 01:11 AM
First thing Instead of '\' use '\\' and try Once Again

Thanx

irb4
September 22nd, 2006, 02:45 AM
Nope didn't work.

MrViggy
September 22nd, 2006, 11:45 AM
Well, with the code you've shown, it doesn't look like you're writing anything into the file.

Post complete code.

Viggy

irb4
September 24th, 2006, 08:48 PM
O yes! It works! First I put this

\\Temp\agon.doc

I didn't work. Then I put this today

\\Temp\\agon.doc

Many thanks, muah! muah!

humptydumpty
September 25th, 2006, 12:08 AM
u welcome :p