[comp.windows.misc] MS Windows

pcb@usl.usl.edu (P.C. Bahrs) (09/13/88)

I think that the news group comp.windows.ms is most appropriate.  If
enough interest occurs then further groups such as comp.windows.os2 
and comp.windows.gem should be added.

pcb@usl.usl.edu (Peter C. Bahrs) (09/21/88)

Windows 386 File-About option displays disk space, free conventional
memory and ex. memory.  Windows 286 only shows free memory.  I haven't
seen any functions in SDK that explains how to determine free ex. memory
except GlobalCompact().  Does anyone know how to determine the other?

Thanks
pcb@usl.usl.edu csnet

pcb@usl.usl.edu (Peter C. Bahrs) (10/04/88)

Well, I just returned from the OOPSLA 88 Conference in San Diego.  I heard
a lot about MS Windows, C, and C++, et.al.

1) Zortech is not releasing and hooks into MS Windows with its C++ compiler.

2) Glockenspeil (excuse spelling) has ported AT&T's C++ to the DOS environment.
They are associated with a company that produced CommonView, which is
a class library of MS Windows abstractions.  An example they had was a
12 line program to create a pen drawing window. Pretty neat.
  However, rumor is (with a shhhh!) that the 'Big M...' will soon be 
marketing this product.

3) Consider what happens in MS Windows when moving segments (i.e. pointers
are changed, memory compacted, etc).  If your code is developed correctly
everything is fine.
   So how are you doing IO???  Note that all of the C libraries are
C libraries.  So if you call a stdio function, like scanf or printf and
windows decides to move these routines, what happens.  Well apparently
some of these routines use internall buffers and the pointers do not
get updated like MS Windows pointers and ker-blang, fatal error of
some kind.  This is the information that I got from a couple of great
people from MS while eating salmon and listening to Mitchell Kapor talk.
This 'syndrome' seems to occur with any C routine that may have pointers and
especially when memory is low..

4) Win 2.0 is more streamlined and fine tuned thus it appears to perform
faster than Win 386.  AND, win386 is still non-premptive...no time slice
scheduling.

5) Let me just reiterate how nice it is to program in C++ in the
windows environment, I Must Say.

6) It appears that a port from a MS Windows environment to Presentation
Manager will be about 60% straightforward and about 40% re-thinking/re-coding!

7) C++ and MS Windows will still run under CodeView!

Thats all for now,
Comments: pcb@usl.usl.edu       csnet

blair@enint.Wichita.NCR.COM (Brian Lair) (10/05/88)

In article <445@usl.usl.edu>, pcb@usl.usl.edu (Peter C. Bahrs) writes:
> 
> 1) Zortech is not releasing and hooks into MS Windows with its C++ compiler.
                 ^
	do you mean "now"?

> 6) It appears that a port from a MS Windows environment to Presentation
> Manager will be about 60% straightforward & about 40% re-thinking/re-coding!

This week's PC Week (page 1) reports that Micrografx may come out with a
"tool kit that converts Windows applications to OS/2 Presentation Manager
format without requiring modifications to the source code".  We'll see...

-- 
Brian R. Lair            NCR Corporation, E&M Wichita, Advanced Development
 Brian.Lair@Wichita.NCR.COM
 <{ece-csc,hubcap,gould,rtech}!ncrcae!ncrwic!brian.lair>
 <{ucsd,pyramid,nosc.ARPA}!ncr-sd!ncrwic!brian.lair>

PXH@PSUVM.BITNET (10/11/88)

I have recently purchased a Model 25 Ps/2 - the collegiate kit which includes M
S windows.  Eventhough I have a color monitor, I cannot change the background c
olour.  Apparently that's because I don't have an  EGA adaptor. Fine. but here'
s the real problem.  When I use WRITE.EXE the stuff I input is hardly readable
off the screen.  THis does not happen when I use Notepad etc.  I find the same
problem using a MODEL 50 with a colour monitor.  Any suggestions?
                                            Thanks,
                                                   Deepti

pcb@usl.usl.edu (Peter C. Bahrs) (10/11/88)

In article <358@enint.Wichita.NCR.COM>, blair@enint.Wichita.NCR.COM (Brian Lair) writes:
> In article <445@usl.usl.edu>, pcb@usl.usl.edu (Peter C. Bahrs) writes:
> > 
> > 1) Zortech is not releasing and hooks into MS Windows with its C++ compiler.
>                  ^
> 	do you mean "now"?

After talking with the author of Zortech's C++ compiler and several
representatives from Zortech, they message I received is that they are not
working on a MS windows version at all. 

I have read that Zortech was working on this product (in news) but they
dismissed it.

matt@nbires.nbi.com (Matthew Meighan) (10/27/88)

In article <445@usl.usl.edu>, pcb@usl.usl.edu (Peter C. Bahrs) writes:

# 3) Consider what happens in MS Windows when moving segments (i.e. pointers
# are changed, memory compacted, etc).  If your code is developed correctly
# everything is fine.
# So how are you doing IO???  Note that all of the C libraries are
# C libraries.  So if you call a stdio function, like scanf or printf and
# windows decides to move these routines, what happens.  Well apparently
# some of these routines use internall buffers and the pointers do not
# get updated like MS Windows pointers and ker-blang, fatal error of
# some kind. This 'syndrome' seems to occur with any C routine that may
# have pointers and especially when memory is low..

This problem arises when you try to use buffered I/O, and the C library 
code mallocs a buffer, which Windows translates to a LocalAlloc; Windows
may move your data segment under these conditions, invalidating any 
far pointers into it. 

A couple of work-arounds:

1.  Don't use buffered I/O (fopen, fwrite, etc), use the low-level
open, write, etc instead.  These are safe.  This means that you can't
use fprintf, but you can use sprintf to format a string into a buffer, 
then use write to write it to a file.

2.  Before doing any buffered I/O, use the Microsoft C Library's
setbuf() call to set up your own I/O buffer.  Then, the C library won't
try to malloc one, and the problem you mention will go away.

We've used both of these approaches with no problems, after having
lots of problems trying to do buffered I/O without the setbuf call.

3.  I haven't tried this, but Petzold describes some undocumented
Windows file I/O functions on pages 455-458 of _Programming Windows_.


-- 

---------
Matt Meighan
matt@nbires.nbi.com (nbires\!matt)

av@utacs.UTA.FI (Arto Viitanen) (04/12/89)

What is the difference between Microsoft's Windows version 2.03 and
Windows/286 ?


----------------------------------------------------------------------
Arto Viitanen
University Of Tampere, Department of Computer Science
P.O.Box 607
SF-33101 TAMPERE
FINLAND

av@utacs.uta.fi
av%utacs.uta.fi@uunet.uu.net
----------------------------------------------------------------------