Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 472

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112

Deprecated: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in /home/jerdew5/orbworks.com/forum/includes/bbcode.php on line 112
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3368: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3370: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3371: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3372: Cannot modify header information - headers already sent by (output started at /includes/bbcode.php:472)
OrbWorks Community Forum • View topic - filecopy in pocketC
Page 1 of 1

PostPosted: Mon Feb 17, 2003 11:11 am
by Giancarlo Italy
Hello,
I am writing a small application that copy and eventually overwrite *.lex file in the /windows directory. I used the flag for the automatic overwrite of files in vain. It seems that pocketC do not overwrite these files (system files?). Is there a (simple) way to do it?
Please note that I don't use CEAPI.

Thank you Giancarlo ITaly

ciao

PostPosted: Mon Feb 17, 2003 3:40 pm
by joh.becker
The flags at fileopen are a bit funny and not as they should be. Try different combinations. I had a similar problem where I wanted to create and then append to that file. This requires to try to append and if it failey then to create it.

If you just want to write always to overwritre the file, just use the create flag.

Johannes

PostPosted: Tue Feb 18, 2003 8:53 am
by Giancarlo Italy
Hello,
thank you for your reply. I need to copy a different mssp2_en.lex file in the windows directory in my J720. The fact is that the file exist and when I try to overwrite it, the copy fails even if I set the overwrite flag.

Any idea?

thank you Giancarlo

ciao

PostPosted: Tue Feb 18, 2003 10:09 am
by guy
Try deleting the file first, then create a new one.


Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum

PostPosted: Wed Feb 19, 2003 11:37 am
by Giancarlo Italy
Hello,
I tried to delete the *.lex file with this code:

#include "\\pcheader.h"
main()
{
int risult1;
risult1=DeleteFile("\\Windows\\mssp2_en.lex");
alert(risult1);
}

but the alert box say '0'. Do I miss something?

Thank you Giancarlo

ciao

PostPosted: Wed Feb 19, 2003 11:48 am
by guy
Is the file deleted after you run the program?

DeleteFile() returns -1, 0, or 1.

-1 means the file didn't exist in the first place.
I don't know which way round the other two results
are.

You could try calling GetLastError() to get the real
windows CE error code. You need CEAPI for GetLastError().




Guy
[url]mailto:pcform@pcform.net[/url]
http://www.pcform.net
PocketC CE API interface: http://www.networkdynamics.net/PCForm.html#library
PCForm and CE API forum: http://www.networkdynamics.net/forum

PostPosted: Thu Feb 20, 2003 12:46 pm
by Giancarlo Italy
Hello,
the file was not deleted. The scope of the file deletion is a tiny application that overwrites *.lex files to allow to use different vocabs files i.e. italian, english or french when using pocket word.

I was trying to do it by myself but it seems to be an hard task:x...

Thank you Giancarlo

ciao

PostPosted: Fri Feb 21, 2003 7:07 am
by joh.becker
You may try to use filemove() for that.

Johannes

PostPosted: Sat Mar 08, 2003 5:20 am
by Mickle
You cannot delete or rename "\\windows\\mssp2_en.lex" because it file located in ROM.
But you can use filemove("\\your_file.lex", "\\windows\\mssp2_en.lex");
It must work.
.
PS
filemove(string, string); BUT NOT filemove(string, string, int); Documentation are bad (see default.dat).
Don't use MoveFile() from PocketC standart library - has bug.