File Transfer Problem

A

Abhishek

Hii Everyone,

I got a fundamental problem. I add a file to my project in .net compact C#,
and set it to Build Action to Content. The basic objective is when I deploy
my solution it uploads the file to the emulator. This works fine. Now when I
use a FileStream object to read bytes of from this file I find that my
middle bytes have different values then they have on the desktop. For
instance value of a byte(213) in the file on the disk is decimal value, 62
and the same byte in my pocket pc application has decimal value 65. Why is
this happening? In my pocket pc app I am not doing any thing except use a
FileStream object with the path of the file and then I declare a byte array
and BinaryReader ReadBytes method to read into my byte array. So when I
inspect this byte array i find that the bytes are no longer having the same
decimal values. As I gave the e.g. above byte # 213 on the PC has 62 and on
the Pocket PC emulator has 65. And this is not for only this byte but many
other. The file that I am referring to is a JPG file. Please suggest me what
could be wrong and what is the way out? I suspect it has something to do
with encoding but I am not sure.

Regards,
Abhishek
 
R

Roman Batoukov [MS]

Would you mind sharing a code for your file reading routine?
It's hard to tell what's wrong with it otherwise.

Roman

This posting is provided "AS IS" with no warranties, and confers no rights.


--------------------
| From: "Abhishek" <[email protected]>
| Subject: File Transfer Problem
| Date: Sun, 18 Jan 2004 04:17:09 -0500
| Lines: 23
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <#[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: alb-24-194-38-164.nycap.rr.com 24.194.38.164
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP11.
phx.gbl
| Xref: cpmsftngxa07.phx.gbl
microsoft.public.dotnet.framework.compactframework:43337
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
| Hii Everyone,
|
| I got a fundamental problem. I add a file to my project in .net compact
C#,
| and set it to Build Action to Content. The basic objective is when I
deploy
| my solution it uploads the file to the emulator. This works fine. Now
when I
| use a FileStream object to read bytes of from this file I find that my
| middle bytes have different values then they have on the desktop. For
| instance value of a byte(213) in the file on the disk is decimal value, 62
| and the same byte in my pocket pc application has decimal value 65. Why is
| this happening? In my pocket pc app I am not doing any thing except use a
| FileStream object with the path of the file and then I declare a byte
array
| and BinaryReader ReadBytes method to read into my byte array. So when I
| inspect this byte array i find that the bytes are no longer having the
same
| decimal values. As I gave the e.g. above byte # 213 on the PC has 62 and
on
| the Pocket PC emulator has 65. And this is not for only this byte but many
| other. The file that I am referring to is a JPG file. Please suggest me
what
| could be wrong and what is the way out? I suspect it has something to do
| with encoding but I am not sure.
|
| Regards,
| Abhishek
|
|
|

This posting is provided "AS IS" with no warranties, and confers no rights.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top