Article View: comp.windows.misc
Article #1037Re: Questions Re MS-Windows Dev Cost
From: greg yachuk
Date: Fri, 23 Sep 1988 17:56
Date: Fri, 23 Sep 1988 17:56
38 lines
2018 bytes
2018 bytes
In article <8520002@hp-lsd.HP.COM> davek@hp-lsd.HP.COM (Dave Kumpf) writes:
>1) Why is MS-C required?
It isn't. You can use C, Pascal or Assembler. There are several caveats:
i) Windows uses Pascal calling conventions (e.g. reversing the stacked
parameters, called function pops arguments). All calls to Windows
and all functions which will be called by Windows must adhere to this
convention.
ii) All callback functions must be FAR, even if the code is small or
compact model.
iii) All callback functions require a special Windows prolog and epilog.
With MS C, you include it with the -Gw option (at compile time).
You can probably determine what the prolog and epilog are from an
include file (cmacros.inc) supplied with the SDK. This file is
used when developing in Assembler.
iv) All Windows functions that use structures used PACKED structures.
With MS C, you use the -Zp option.
v) You must respect MS C return value conventions. Things which can
be represented in 16 bits are returned in AX. Things which require
32 bits are returned in DX:AX. That is, DX has high-order 16 bits,
AX has low-order 16 bits.
As you can see, you do not NEED MS C, but good luck finding any non-MS
language which fill all these criteria.
Note: This information was gleaned from
Microsoft Windows Software Development Kit Version 2.00
Programming Tools, Chapter 2 "Cl, Pascal and the Macro Assembler"
>Dave Kumpf
>hplabs!hp-lsd!davek
Greg Yachuk Informix Software Inc., Menlo Park, CA (415) 322-4100
{uunet,pyramid}!infmx!greggy why yes, I DID choose that login myself
Technical Details
Message-ID:
<460@infmx.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!pyramid!infmx!greggyReferences:
<8520002@hp-lsd.HP.COM>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!ncrlnk!ncr-sd!hp-sdd!hplabs!pyramid!infmx!greggy From: greggy@infmx.UUCP (greg yachuk) Newsgroups: comp.windows.misc Subject: Re: Questions Re MS-Windows Dev Cost Message-ID: <460@infmx.UUCP> Date: 23 Sep 88 17:56:25 GMT References: <8520002@hp-lsd.HP.COM> Reply-To: greggy@infmx.UUCP (greg yachuk) Organization: Informix, Menlo Park, Ca. U.S.A. Lines: 38