HighTechTalks DotNet Forums  

File Transfer Problem

Dotnet FAQs microsoft.public.dotnet.faqs


Discuss File Transfer Problem in the Dotnet FAQs forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Abhishek
 
Posts: n/a

Default File Transfer Problem - 01-18-2004 , 04:17 AM






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



Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.