[comp.windows.ms] Communication between DOS applic's

oferf@shum.huji.ac.il (ofer faigon) (11/17/88)

Does anyone know of a way to pass data between two DOS applications
running under win/386 ?
Or between a DOS application and a windows application?

I have a program written in MS C (my copmpiler is ver 5.0) built to run
under normal DOS, and another program written for MS Windows (again,
MSC 5.0) and I need to pass blocks of data (about 1k each) between them.

Pls reply on the net - my Email address keeps changing and is not reliable.

					- Ofer Faigon

rogerson@PEDEV.Columbia.NCR.COM (rogerson) (11/18/88)

In article <344@hurt6.Huji.Ac.IL> ofer faigon <shum!@humus.Huji.AC.IL:oferf> writes:
>Does anyone know of a way to pass data between two DOS applications
>I have a program written in MS C (my copmpiler is ver 5.0) built to run
>under normal DOS, and another program written for MS Windows (again,
>MSC 5.0) and I need to pass blocks of data (about 1k each) between them.
>					- Ofer Faigon

	Look in the MS SDK Guide to Programming Tools.  I believe one of the
	sections is Old Apps support.  This section tells how to use the
	clipboard from an old app (like MS-Word).  It also details how to
	use DDE within old Apps.  The information looks pretty sketchy, but
	it is there.  Please, post anything you find out here.  I think 
	we all will be interested.

	-----Dale
		Rogerson-----

johnl@ima.ima.isc.com (John R. Levine) (11/19/88)

In article <2277@PEDEV.Columbia.NCR.COM> rogerson@PEDEV.Columbia.NCR.COM () writes:
>	Look in the MS SDK Guide to Programming Tools.  ...
>	...  It also details how to use DDE within old Apps.  

Not quite.  It tells you how to use DDE to talk to WinOldAp, the agent program
that manages a window in which you are running a DOS program.  Your windows
program can do all sorts of swell stuff to the DOS program's window, such as
defining menus and macros that are stuffed to the DOS program when you pick
a menu entry, but you can't use DDE to talk directly to a cooperating DOS
program.  There is a hack for DOS programs (notably MS Word) to use the
clipboard, but not DDE.  I called MS and asked about that, and they said
there was no chance than DOS apps would ever be able to talk to DDE.  Yetch.
When you consider what a crock Windows 386 is internally, I suppose I'm not
surprised.
-- 
John R. Levine, Segue Software, POB 349, Cambridge MA 02238, +1 617 492 3869
{ bbn | spdcc | decvax | harvard | yale }!ima!johnl, Levine@YALE.something
Kids spend more time with their parents than parents spend with their kids.

mguyott@mirror.TMC.COM (Marc Guyott) (11/19/88)

In article <344@hurt6.Huji.Ac.IL> ofer faigon <shum!@humus.Huji.AC.IL:oferf> writes:
>
>Does anyone know of a way to pass data between two DOS applications
>running under win/386 ?

Two applications running under Windows/386 can use DDE or the Clipboard to
exchange data.

>Or between a DOS application and a windows application?

I don't believe there is an easy way to do this.

                                                       Marc
----
              "All my life I always wanted to BE somebody.
               I see now I should have been more specific."
                      Jane Wagner (but I agree 8-)
Marc Guyott                                         mguyott@mirror.TMC.COM
{mit-eddie, pyramid, harvard!wjh12, xait, datacube}!mirror!mguyott
Mirror Systems	Cambridge, MA  02140                617/661-0777

mcdonald@uxe.cso.uiuc.edu (11/21/88)

>Does anyone know of a way to pass data between two DOS applications
>running under win/386 ?
Answer: disk files and extreme care with timing.

Charlie@umn-cs.CS.UMN.EDU (Charles Anderson) (11/24/88)

In article <245400001@uxe.cso.uiuc.edu> mcdonald@uxe.cso.uiuc.edu writes:
>
>>Does anyone know of a way to pass data between two DOS applications
>>running under win/386 ?
>Answer: disk files and extreme care with timing.

Better yet, if your going to use disk files for 1k chunks, just have one of
the programs allocate a communications structure, and write the value of the
pointer (absolute segment, and offset) to the clipboard, or a disk file, and
then write all your stuff there.  --
Charlie Anderson - caa@midgard.mn.org

bturner@hpcvlx.HP.COM (Bill Turner) (11/29/88)

>>>Does anyone know of a way to pass data between two DOS applications
>>>running under win/386 ?
>>Answer: disk files and extreme care with timing.

>Better yet, if your going to use disk files for 1k chunks, just have one of
>the programs allocate a communications structure, and write the value of the
>pointer (absolute segment, and offset) to the clipboard, or a disk file, and
>then write all your stuff there.  --

Better yet, allocate a block of shared memory and pass the handle on the
clipboard.  If you pass a pointer that isn't to shared memory (allocated
with GMEM_SHARE), then it isn't guaranteed to work, especially if you have
bank-switching enabled.

--Bill Turner

Charlie@umn-cs.CS.UMN.EDU (Charles Anderson) (12/02/88)

In article <106580003@hpcvlx.HP.COM> bturner@hpcvlx.HP.COM (Bill Turner) writes:
|>>>Does anyone know of a way to pass data between two DOS applications
|>>>running under win/386 ?
|>>Answer: disk files and extreme care with timing.
|
|>Better yet, if your going to use disk files for 1k chunks, just have one of
|>the programs allocate a communications structure, and write the value of the
|>pointer (absolute segment, and offset) to the clipboard, or a disk file, and
|>then write all your stuff there.  --
|
|Better yet, allocate a block of shared memory and pass the handle on the
|clipboard.  If you pass a pointer that isn't to shared memory (allocated
|with GMEM_SHARE), then it isn't guaranteed to work, especially if you have
|bank-switching enabled.
|
|--Bill Turner

The question is relating to DOS applications running under win/386 and I was
assuming that he didn't have the SDK since he was only writing dos 
applications.
--
Charlie Anderson - caa@midgard.mn.org