Hi,everyone,
The attachment file was not created by vfp, I want to create and operate
such file in vfp. I can't create it in vfp by fcreate & fwrite function,
also I can't read the right information from the attached file by fread. The
attached file includes two continuous digits: 0000000001 and 0005183372,
you can see it by debug. Anyone can give me ideas?

thks in advance?

chuen


begin 666 m.t
+J@`````!``48,W(`
`
end

Re: How can operate such low-level file in vfp? by quan

quan
Wed Nov 26 02:35:31 CST 2003

You can see the attached file in debug the following:
AA 00 00 00 00 01 00 05-18 33 72
If I create a file by such method in vfp:
fhand=fcreate("my.t")
fwrite(fhand,chr(170)+chr(0)+chr(0)+chr(0)+chr(0)+chr(1)+chr(0)+chr(5)+chr(1
8)+chr(33)+chr(72))

Then if i debug the file created just now, I will get the following result:
AA 00 00 00 00 01 00 05-12 21 48

I can't understand why, anyone can tell me why?

tks!

"quan" <cnchuen@hotmail.com> дÈëÓʼþ
news:OeUIQX$sDHA.2348@TK2MSFTNGP09.phx.gbl...
> Hi,everyone,
> The attachment file was not created by vfp, I want to create and operate
> such file in vfp. I can't create it in vfp by fcreate & fwrite function,
> also I can't read the right information from the attached file by fread.
The
> attached file includes two continuous digits: 0000000001 and 0005183372,
> you can see it by debug. Anyone can give me ideas?
>
> thks in advance?
>
> chuen
>
>
>



Re: How can operate such low-level file in vfp? by quan

quan
Wed Nov 26 02:49:56 CST 2003

I know the reason, thank you!

"quan" <cnchuen@hotmail.com> дÈëÓʼþ
news:OC0Cyh$sDHA.2380@TK2MSFTNGP09.phx.gbl...
> You can see the attached file in debug the following:
> AA 00 00 00 00 01 00 05-18 33 72
> If I create a file by such method in vfp:
> fhand=fcreate("my.t")
>
fwrite(fhand,chr(170)+chr(0)+chr(0)+chr(0)+chr(0)+chr(1)+chr(0)+chr(5)+chr(1
> 8)+chr(33)+chr(72))
>
> Then if i debug the file created just now, I will get the following
result:
> AA 00 00 00 00 01 00 05-12 21 48
>
> I can't understand why, anyone can tell me why?
>
> tks!
>
> "quan" <cnchuen@hotmail.com> дÈëÓʼþ
> news:OeUIQX$sDHA.2348@TK2MSFTNGP09.phx.gbl...
> > Hi,everyone,
> > The attachment file was not created by vfp, I want to create and operate
> > such file in vfp. I can't create it in vfp by fcreate & fwrite function,
> > also I can't read the right information from the attached file by fread.
> The
> > attached file includes two continuous digits: 0000000001 and
0005183372,
> > you can see it by debug. Anyone can give me ideas?
> >
> > thks in advance?
> >
> > chuen
> >
> >
> >
>
>



Re: How can operate such low-level file in vfp? by Fred

Fred
Wed Nov 26 09:31:24 CST 2003

Your file is in binary. Without digging deeper, I don't know if it's
floating point values or simply integers. I would assume from your
discription that it's integers, stored as 4 bytes each, but that doesn't
match with your file size of 16 bytes.

Fred
Microsoft Visual FoxPro MVP

"quan" <cnchuen@hotmail.com> wrote in message
news:OeUIQX$sDHA.2348@TK2MSFTNGP09.phx.gbl...
> Hi,everyone,
> The attachment file was not created by vfp, I want to create and operate
> such file in vfp. I can't create it in vfp by fcreate & fwrite function,
> also I can't read the right information from the attached file by fread.
The
> attached file includes two continuous digits: 0000000001 and 0005183372,
> you can see it by debug. Anyone can give me ideas?
>
> thks in advance?
>
> chuen
>
>
>



Re: How can operate such low-level file in vfp? by Villi

Villi
Wed Nov 26 09:47:00 CST 2003

quan wrote:
> I know the reason, thank you!

Well, er... and let us know it?
TIA,
Villi



Re: How can operate such low-level file in vfp? by Leonid

Leonid
Wed Nov 26 10:33:03 CST 2003

There must be

fwrite(fhand,chr(0xAA)+chr(0x0)+chr(0x0)+chr(0x0)+chr(0x0)+ ;
chr(0x1)+chr(0x0)+chr(0x5)+chr(0x18)+chr(0x33)+chr(0x72))

instead of

fwrite(fhand,chr(170)+chr(0)+chr(0)+chr(0)+chr(0)+ ;
chr(1)+chr(0)+chr(5)+chr(18)+chr(33)+chr(72))


Leonid


"Villi Bernaroli" <a@b.c> wrote in message =
news:u17SJSDtDHA.2440@TK2MSFTNGP12.phx.gbl...
> quan wrote:
> > I know the reason, thank you!
>=20
> Well, er... and let us know it?
> TIA,
> Villi
>=20
>=20


Re: How can operate such low-level file in vfp? by NikV

NikV
Sat Nov 29 19:07:10 CST 2003

surely just hex------decimal 0xAA - 170 ....0x48 - 72 ?


"quan" <cnchuen@hotmail.com> wrote in message
news:OC0Cyh$sDHA.2380@TK2MSFTNGP09.phx.gbl...
> You can see the attached file in debug the following:
> AA 00 00 00 00 01 00 05-18 33 72
> If I create a file by such method in vfp:
> fhand=fcreate("my.t")
>
fwrite(fhand,chr(170)+chr(0)+chr(0)+chr(0)+chr(0)+chr(1)+chr(0)+chr(5)+chr(1
> 8)+chr(33)+chr(72))
>
> Then if i debug the file created just now, I will get the following
result:
> AA 00 00 00 00 01 00 05-12 21 48
>
> I can't understand why, anyone can tell me why?
>
> tks!
>
> "quan" <cnchuen@hotmail.com> дÈëÓʼþ
> news:OeUIQX$sDHA.2348@TK2MSFTNGP09.phx.gbl...
> > Hi,everyone,
> > The attachment file was not created by vfp, I want to create and operate
> > such file in vfp. I can't create it in vfp by fcreate & fwrite function,
> > also I can't read the right information from the attached file by fread.
> The
> > attached file includes two continuous digits: 0000000001 and
0005183372,
> > you can see it by debug. Anyone can give me ideas?
> >
> > thks in advance?
> >
> > chuen
> >
> >
> >
>
>