dll question/problem

Discuss PocketC for CE (including Desktop Edition)

Postby daparty on Sat Jul 02, 2005 12:12 am

I wrote 2 programs for my PDA, one was a file_find and the other was a hex_dump. I used file_find to list all of the files on my PDA (over 900) and I was using hex_dump to look at some of them.

I found over 150 dll files in my windows directory, but I couldn't look at them with the hex_dump program. I kept getting a -1 from the fileopen command.

filename = "\\windows\\find.dll"
GetFileAttr(filename) responded with 0x2045.
filemodeget(filename) responded with 0. (ascii)
fileopen(filename,0,0) responded with -1.

I put a test file in the windows directory thinking I was doing something wrong, but I was able to hex_dump the test file. I tried several dll files and received the same results, -1. I'm using verson 2.0 time stamp june 17 2000 @ 20:47:53

Anyone have an answer?

Posts: 7
Joined: Mon Mar 08, 2004 11:44 pm

Postby Netrix on Tue Jul 12, 2005 8:14 am

I know what the problem is. First, there are files on your PDA (the ones in the \Windows directory) that are on a chip on the PDA (the ROM). These files are protected system files and cannot be opened or copied. Hence the -1; It means that fileopen() has failed to open the file. I've tried to open them myself with a decompiler to learn their secrets. As far as I know, there is no way to open them. That is also the reason why you were able to open a file that you made in the \Windows directory. The file that you made wasn't a protected system file on the ROM. Hope this helps.

"I see", said the blind man.
"I see", said the blind man.
Posts: 3
Joined: Tue Jul 12, 2005 1:35 am
Location: USA

Return to PocketC for CE

Who is online

Users browsing this forum: No registered users and 1 guest