Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!agate!ig!uwmcsd1!uxc!uxc.cso.uiuc.edu!uxg.cso.uiuc.edu!uxe.cso.uiuc.edu!mcdonald From: mcdonald@uxe.cso.uiuc.edu Newsgroups: comp.windows.misc Subject: Re: Questions Re MS-Windows Dev Cost Message-ID: <68600016@uxe.cso.uiuc.edu> Date: 23 Sep 88 14:39:00 GMT References: <8520002@hp-lsd.HP.COM> Lines: 32 Nf-ID: #R:hp-lsd.HP.COM:8520002:uxe.cso.uiuc.edu:68600016:000:1491 Nf-From: uxe.cso.uiuc.edu!mcdonald Sep 23 09:39:00 1988 >>It seems to me (not knowing enough about C) that >>if you have a linker that understands the Windows LIB and if your compiler >>supports PASCAL calling sequences, you should be able to use that C >>compiler. (Or does Windows depend on what the compiler does with registers?) >> >I would be curious to know what the answer to this question is. The answer is that you absolutely must use Microsoft C and have the Windows SDK to do C programming. In the first place, there is a special "linker" called "link4" which reads not only object files but something called a .def file which tells it whether segments are fixed, moveable, discardable, etc., and informs it which C functions are directly called by Windows. Those that are must use a special calling sequence such that they can't be called directly from your C code (if you, for example, ask for a code pointer you get an entry point inside Windows itself; if you call that point Windows will figure out where the routine really is and call it). I have now done a lot of Windows programming and find that, after 8 months, it gets relatively straightforward. Output is not bad at all, input is messy and a nuisance, while memory management is an unholy terror and a good reason to forget about the whole thing. Once again, before you even consider buying the Windows SDK, read the book "Programming Windows" by Charles Petzold. $24.95 at any Waldenbooks or B. Dalton (at least in this town they all carry them). Doug McDonald