Thread View: comp.windows.misc
4 messages
4 total messages
Started by Peter C. Bahrs
Mon, 03 Oct 1988 21:06
MS Windows
Author: Peter C. Bahrs
Date: Mon, 03 Oct 1988 21:06
Date: Mon, 03 Oct 1988 21:06
39 lines
2260 bytes
2260 bytes
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
Re: MS Windows
Author: Brian Lair
Date: Wed, 05 Oct 1988 13:04
Date: Wed, 05 Oct 1988 13:04
18 lines
1239 bytes
1239 bytes
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>
Re: MS Windows
Author: Peter C. Bahrs
Date: Tue, 11 Oct 1988 16:30
Date: Tue, 11 Oct 1988 16:30
13 lines
935 bytes
935 bytes
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.
Re: MS Windows
Author: Matthew Meighan
Date: Wed, 26 Oct 1988 23:43
Date: Wed, 26 Oct 1988 23:43
43 lines
2261 bytes
2261 bytes
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)
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads