Discussion:
Function to send a file by ethernet
(too old to reply)
j***@free.fr
2006-04-18 15:14:35 UTC
Permalink
I want to create a button to allow to send a file by ethernet in a
other computer.
How can I do ?
Dick Dawson
2006-04-18 16:28:38 UTC
Permalink
I don't think this is particularly an MFC question but I read this group
because I don't know MFC very well rather than to answer questions. So
beware that my suggestion is not particularly MFC or even Microsoft
oriented.

The question itself suggests you do not know a lot about networking so I'll
provide an answer that does not require much networking knowledge. Another
issue is that you haven't supplied any information about the application so
my solution, which allows the "sending" machine to simply deposit a file in
the "receiving machine, may not be what you want.

The "sending" machine probably has a tftp client program. For example try
"tftp /?" from a Windows command prompt. Determine if the receiving machine
has a tftp server. A Windows Server box or any Windows machine with a RIS
service should have this server. If not, there are many sources of such a
server. Other machines such as Unix machine probably have this server
available. Now you need only to create the ftp client process with the
appropriate run-time parameters and the file will be sent to the server
machine. You need to read a little bit about where the file will end up on
the server machine.
Post by j***@free.fr
I want to create a button to allow to send a file by ethernet in a
other computer.
How can I do ?
Joseph M. Newcomer
2006-04-19 01:54:05 UTC
Permalink
There aren't any. There are high-level protocols such as FTP, and there are libraries
that handle FTP transfers, but you can't magically just "send" a file to another computer.
There has to be a program running on the other computer that is willing to receive the
contents and write the bits to disk. FTP is one such program in common use. Go to the
MSDN, search for FTP, and there is a topic called "FTP Sessions" (the fourth hit down on
my search) that explains how to use FTP. But this requires that the target computer is
running FTP. Otherwise, you have to write something that handles the transfer.
joe
Post by j***@free.fr
I want to create a button to allow to send a file by ethernet in a
other computer.
How can I do ?
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
j***@free.fr
2006-04-19 07:44:53 UTC
Permalink
Hello,

In fact, i want to send a file in the hard disk of my second computer
in a special place.
For example, in the 10000 sectors.

Thank you
Joseph M. Newcomer
2006-04-19 13:31:18 UTC
Permalink
This doesn't make any sense. You cannot control the sector addresses on the hard drive
where data is written. Not in a normal file system. And it still goes back to the point
that you can't "send" a file from one computer to another unless the other computer has a
way to "receive" it.

Short of writing your own file system (6 people, 18 months, minimum budget about $250K+9
salary years, you aren't going to be able to write any file at any sector address. Why
would you even think this made sense?
joe
Post by j***@free.fr
Hello,
In fact, i want to send a file in the hard disk of my second computer
in a special place.
For example, in the 10000 sectors.
Thank you
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Ian Semmel
2006-04-19 20:21:36 UTC
Permalink
Maybe he's using DOS/360 circa 1969
Post by Joseph M. Newcomer
This doesn't make any sense. You cannot control the sector addresses on the hard drive
where data is written. Not in a normal file system. And it still goes back to the point
that you can't "send" a file from one computer to another unless the other computer has a
way to "receive" it.
Short of writing your own file system (6 people, 18 months, minimum budget about $250K+9
salary years, you aren't going to be able to write any file at any sector address. Why
would you even think this made sense?
joe
Post by j***@free.fr
Hello,
In fact, i want to send a file in the hard disk of my second computer
in a special place.
For example, in the 10000 sectors.
Thank you
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer
2006-04-20 04:37:12 UTC
Permalink
Of course, if you could write at sector 10000, you could also presumably write sector 0.
Perhaps he's a virus writer?

[Good one, by the way. //ddef allowed specification of absolute sector addresses...I was
never so happy as I was when I could stop using JCL...]
joe
Post by Ian Semmel
Maybe he's using DOS/360 circa 1969
Post by Joseph M. Newcomer
This doesn't make any sense. You cannot control the sector addresses on the hard drive
where data is written. Not in a normal file system. And it still goes back to the point
that you can't "send" a file from one computer to another unless the other computer has a
way to "receive" it.
Short of writing your own file system (6 people, 18 months, minimum budget about $250K+9
salary years, you aren't going to be able to write any file at any sector address. Why
would you even think this made sense?
joe
Post by j***@free.fr
Hello,
In fact, i want to send a file in the hard disk of my second computer
in a special place.
For example, in the 10000 sectors.
Thank you
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Joseph M. Newcomer
2006-04-20 04:39:38 UTC
Permalink
[Funny thing about getting older...from 1963 to perhaps 1987 or 1988, "DOS" had a very
specific meaning. And it wasn't the Microsoft product. Note that it took several years
of popularizing MS-DOS before programmers understood what you meant...

Today I teach device drivers in Windows. In 1969 I was learning how to chain CCWs. Some
things are inescapable...]
joe
Post by Ian Semmel
Maybe he's using DOS/360 circa 1969
Post by Joseph M. Newcomer
This doesn't make any sense. You cannot control the sector addresses on the hard drive
where data is written. Not in a normal file system. And it still goes back to the point
that you can't "send" a file from one computer to another unless the other computer has a
way to "receive" it.
Short of writing your own file system (6 people, 18 months, minimum budget about $250K+9
salary years, you aren't going to be able to write any file at any sector address. Why
would you even think this made sense?
joe
Post by j***@free.fr
Hello,
In fact, i want to send a file in the hard disk of my second computer
in a special place.
For example, in the 10000 sectors.
Thank you
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Ian Semmel
2006-04-20 20:47:04 UTC
Permalink
One of the good things (from a programmer's perspective) in those days was the
variety of hardware we had to work on.
IBM, Burroughs, NCR, Honeywell, CDC et al, and they were all different !
Post by Joseph M. Newcomer
[Funny thing about getting older...from 1963 to perhaps 1987 or 1988, "DOS" had a very
specific meaning. And it wasn't the Microsoft product. Note that it took several years
of popularizing MS-DOS before programmers understood what you meant...
Today I teach device drivers in Windows. In 1969 I was learning how to chain CCWs. Some
things are inescapable...]
joe
Post by Ian Semmel
Maybe he's using DOS/360 circa 1969
Post by Joseph M. Newcomer
This doesn't make any sense. You cannot control the sector addresses on the hard drive
where data is written. Not in a normal file system. And it still goes back to the point
that you can't "send" a file from one computer to another unless the other computer has a
way to "receive" it.
Short of writing your own file system (6 people, 18 months, minimum budget about $250K+9
salary years, you aren't going to be able to write any file at any sector address. Why
would you even think this made sense?
joe
Post by j***@free.fr
Hello,
In fact, i want to send a file in the hard disk of my second computer
in a special place.
For example, in the 10000 sectors.
Thank you
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer
2006-04-21 04:37:32 UTC
Permalink
Nearly all of them used mutually incopatible character sets. RCA adopted EBCDIC to
compete with IBM, some used 7-bit ASCII, but sometimes with odd character glyphs for some
of the character positions (I remember one that had "¢¤" in place of, if I remember
correctly, "[]", and many used unique character codes (there were special subroutines so
the Honeywell 200 series could do an alphabetic sort and get the same collating result as
an IBM 14xx series, for example). Even within a given manufacturer, there were 6-bit,
7-bit, and 8-bit product lines with mutually incompatible character sets (we will ignore
the 1620 which used two decimal digits to represent an alphabetic character, using the
encoding CF8421 for each byte, where C was the "check", or parity bit. Note that there
were only 5 data bits, and F was the flag bit, which terminated variable-length fields for
various operations. The 14xx series used CBA8421M, or 6-bit bytes, where BA represented
sign values (BA was +, B was -, and A was a special +; BA=00 was treated as a positive
sign), and M was the "word mark" which terminated variable-length right-to-left field
moves. Honeywell used CBA8421MR where R was the record mark, usually used to terminate
left-to-right moves, and MR together was a group mark, and end-of-buffer flag for I/O
operations, while the 14xx series had the code BA82 to mean record mark and BA8421 to mean
group mark, if memory serves me rightly). To say that data interchange posed certain
challenges was to understate the situation.

It made the differences between a 680x0 (big endian) and 80x86 (little endian) look
positively programmer-friendly by comparison!

Or another hot topic here recently, Unicode vs. ANSI vs. UTF-8 is a truly trivial problem
compared to exhanging data between two computers of that era (don't even THINK about the
issues of 7-track vs. 9-track tape...)
joe
Post by Ian Semmel
One of the good things (from a programmer's perspective) in those days was the
variety of hardware we had to work on.
IBM, Burroughs, NCR, Honeywell, CDC et al, and they were all different !
Post by Joseph M. Newcomer
[Funny thing about getting older...from 1963 to perhaps 1987 or 1988, "DOS" had a very
specific meaning. And it wasn't the Microsoft product. Note that it took several years
of popularizing MS-DOS before programmers understood what you meant...
Today I teach device drivers in Windows. In 1969 I was learning how to chain CCWs. Some
things are inescapable...]
joe
Post by Ian Semmel
Maybe he's using DOS/360 circa 1969
Post by Joseph M. Newcomer
This doesn't make any sense. You cannot control the sector addresses on the hard drive
where data is written. Not in a normal file system. And it still goes back to the point
that you can't "send" a file from one computer to another unless the other computer has a
way to "receive" it.
Short of writing your own file system (6 people, 18 months, minimum budget about $250K+9
salary years, you aren't going to be able to write any file at any sector address. Why
would you even think this made sense?
joe
Post by j***@free.fr
Hello,
In fact, i want to send a file in the hard disk of my second computer
in a special place.
For example, in the 10000 sectors.
Thank you
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
Joseph M. Newcomer [MVP]
email: ***@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
--
NewsGuy.Com 30Gb $9.95 Carry Forward and On Demand Bandwidth
Continue reading on narkive:
Loading...