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

filecopy in pocketC

Discuss PocketC for CE (including Desktop Edition)

Postby Giancarlo Italy on Mon Feb 17, 2003 11:11 am

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
ciao
Giancarlo Italy
 
Posts: 8
Joined: Sat Feb 01, 2003 8:38 pm
Location: Italy

Postby joh.becker on Mon Feb 17, 2003 3:40 pm

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
joh.becker
 
Posts: 86
Joined: Tue Apr 17, 2001 6:51 am
Location: Germany

Postby Giancarlo Italy on Tue Feb 18, 2003 8:53 am

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
ciao
Giancarlo Italy
 
Posts: 8
Joined: Sat Feb 01, 2003 8:38 pm
Location: Italy

Postby guy on Tue Feb 18, 2003 10:09 am

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
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
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby Giancarlo Italy on Wed Feb 19, 2003 11:37 am

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
ciao
Giancarlo Italy
 
Posts: 8
Joined: Sat Feb 01, 2003 8:38 pm
Location: Italy

Postby guy on Wed Feb 19, 2003 11:48 am

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
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
guy
 
Posts: 879
Joined: Thu Dec 07, 2000 8:58 am
Location: United Kingdom

Postby Giancarlo Italy on Thu Feb 20, 2003 12:46 pm

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
ciao
Giancarlo Italy
 
Posts: 8
Joined: Sat Feb 01, 2003 8:38 pm
Location: Italy

Postby joh.becker on Fri Feb 21, 2003 7:07 am

You may try to use filemove() for that.

Johannes
joh.becker
 
Posts: 86
Joined: Tue Apr 17, 2001 6:51 am
Location: Germany

Postby Mickle on Sat Mar 08, 2003 5:20 am

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.
Mickle
 
Posts: 48
Joined: Wed Apr 17, 2002 1:22 am
Location: Russia


Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 4 guests

cron