Artifact 886c2dae4f8ee53d9c48e8fc1b4155ca974060c3:
0000: 2f 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a /***************
0010: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0020: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0030: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0040: 2a 2a 2a 2a 2a 2a 2a 2a 5c 0a 2a 20 20 20 20 20 ********\.*
0050: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0060: 20 20 20 20 20 20 20 20 20 20 77 69 6e 64 6f 77 window
0070: 73 2e 64 20 20 20 20 20 20 20 20 20 20 20 20 20 s.d
0080: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0090: 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 *.*
00a0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00b0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00d0: 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20 *.*
00e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
00f0: 20 20 20 20 20 20 57 69 6e 64 6f 77 73 20 41 50 Windows AP
0100: 49 20 68 65 61 64 65 72 20 6d 6f 64 75 6c 65 20 I header module
0110: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0120: 20 20 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20 *.*
0130: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0140: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0150: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0160: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0170: 2a 0a 2a 20 20 20 20 20 20 20 20 20 20 20 20 20 *.*
0180: 54 72 61 6e 73 6c 61 74 65 64 20 66 72 6f 6d 20 Translated from
0190: 4d 69 6e 47 57 20 41 50 49 20 66 6f 72 20 4d 53 MinGW API for MS
01a0: 2d 57 69 6e 64 6f 77 73 20 33 2e 31 30 20 20 20 -Windows 3.10
01b0: 20 20 20 20 20 20 20 20 20 20 2a 0a 2a 20 20 20 *.*
01c0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
01d0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
01e0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
01f0: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20 20
0200: 20 20 20 20 2a 0a 2a 20 20 20 20 20 20 20 20 20 *.*
0210: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 50 6c Pl
0220: 61 63 65 64 20 69 6e 74 6f 20 70 75 62 6c 69 63 aced into public
0230: 20 64 6f 6d 61 69 6e 20 20 20 20 20 20 20 20 20 domain
0240: 20 20 20 20 20 20 20 20 20 20 20 20 20 20 2a 0a *.
0250: 5c 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a \***************
0260: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0270: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0280: 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a 2a ****************
0290: 2a 2a 2a 2a 2a 2a 2a 2a 2f 0a 6d 6f 64 75 6c 65 ********/.module
02a0: 20 77 69 6e 33 32 2e 77 69 6e 64 6f 77 73 3b 0a win32.windows;.
02b0: 0a 2f 2a 0a 09 77 69 6e 64 6f 77 73 2e 68 20 2d ./*..windows.h -
02c0: 20 6d 61 69 6e 20 68 65 61 64 65 72 20 66 69 6c main header fil
02d0: 65 20 66 6f 72 20 74 68 65 20 57 69 6e 33 32 20 e for the Win32
02e0: 41 50 49 0a 0a 09 57 72 69 74 74 65 6e 20 62 79 API...Written by
02f0: 20 41 6e 64 65 72 73 20 4e 6f 72 6c 61 6e 64 65 Anders Norlande
0300: 72 20 3c 61 6e 6f 72 6c 61 6e 64 40 68 65 6d 32 r <anorland@hem2
0310: 2e 70 61 73 73 61 67 65 6e 2e 73 65 3e 0a 0a 09 .passagen.se>...
0320: 54 68 69 73 20 66 69 6c 65 20 69 73 20 70 61 72 This file is par
0330: 74 20 6f 66 20 61 20 66 72 65 65 20 6c 69 62 72 t of a free libr
0340: 61 72 79 20 66 6f 72 20 74 68 65 20 57 69 6e 33 ary for the Win3
0350: 32 20 41 50 49 2e 0a 0a 09 54 68 69 73 20 6c 69 2 API....This li
0360: 62 72 61 72 79 20 69 73 20 64 69 73 74 72 69 62 brary is distrib
0370: 75 74 65 64 20 69 6e 20 74 68 65 20 68 6f 70 65 uted in the hope
0380: 20 74 68 61 74 20 69 74 20 77 69 6c 6c 20 62 65 that it will be
0390: 20 75 73 65 66 75 6c 2c 0a 09 62 75 74 20 57 49 useful,..but WI
03a0: 54 48 4f 55 54 20 41 4e 59 20 57 41 52 52 41 4e THOUT ANY WARRAN
03b0: 54 59 3b 20 77 69 74 68 6f 75 74 20 65 76 65 6e TY; without even
03c0: 20 74 68 65 20 69 6d 70 6c 69 65 64 20 77 61 72 the implied war
03d0: 72 61 6e 74 79 20 6f 66 0a 09 4d 45 52 43 48 41 ranty of..MERCHA
03e0: 4e 54 41 42 49 4c 49 54 59 20 6f 72 20 46 49 54 NTABILITY or FIT
03f0: 4e 45 53 53 20 46 4f 52 20 41 20 50 41 52 54 49 NESS FOR A PARTI
0400: 43 55 4c 41 52 20 50 55 52 50 4f 53 45 2e 0a 0a CULAR PURPOSE...
0410: 2a 2f 0a 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 */..public impor
0420: 74 20 77 69 6e 33 32 2e 77 33 32 61 70 69 3b 0a t win32.w32api;.
0430: 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 public import wi
0440: 6e 33 32 2e 63 6f 72 65 3b 0a 0a 2f 2f 20 57 65 n32.core;..// We
0450: 20 63 61 6e 27 74 20 75 73 65 20 73 74 61 74 69 can't use stati
0460: 63 20 69 66 20 66 6f 72 20 69 6d 70 6f 72 74 73 c if for imports
0470: 2c 20 62 75 69 6c 64 20 67 65 74 73 20 63 6f 6e , build gets con
0480: 66 75 73 65 64 2e 0a 76 65 72 73 69 6f 6e 20 28 fused..version (
0490: 57 69 6e 64 6f 77 73 56 69 73 74 61 29 20 7b 0a WindowsVista) {.
04a0: 09 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 .public import w
04b0: 69 6e 33 32 2e 77 69 6e 73 76 63 3b 0a 7d 20 65 in32.winsvc;.} e
04c0: 6c 73 65 20 76 65 72 73 69 6f 6e 20 28 57 69 6e lse version (Win
04d0: 64 6f 77 73 32 30 30 33 29 20 7b 0a 09 70 75 62 dows2003) {..pub
04e0: 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 lic import win32
04f0: 2e 77 69 6e 73 76 63 3b 0a 7d 20 65 6c 73 65 20 .winsvc;.} else
0500: 76 65 72 73 69 6f 6e 20 28 57 69 6e 64 6f 77 73 version (Windows
0510: 58 50 29 20 7b 0a 09 70 75 62 6c 69 63 20 69 6d XP) {..public im
0520: 70 6f 72 74 20 77 69 6e 33 32 2e 77 69 6e 73 76 port win32.winsv
0530: 63 3b 0a 7d 20 65 6c 73 65 20 76 65 72 73 69 6f c;.} else versio
0540: 6e 20 28 57 69 6e 64 6f 77 73 4e 54 6f 6e 6c 79 n (WindowsNTonly
0550: 29 20 7b 0a 09 70 75 62 6c 69 63 20 69 6d 70 6f ) {..public impo
0560: 72 74 20 77 69 6e 33 32 2e 77 69 6e 73 76 63 3b rt win32.winsvc;
0570: 0a 7d 0a 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 .}..public impor
0580: 74 20 77 69 6e 33 32 2e 63 64 65 72 72 3b 0a 70 t win32.cderr;.p
0590: 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e ublic import win
05a0: 33 32 2e 64 64 65 3b 0a 70 75 62 6c 69 63 20 69 32.dde;.public i
05b0: 6d 70 6f 72 74 20 77 69 6e 33 32 2e 64 64 65 6d mport win32.ddem
05c0: 6c 3b 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 l;.public import
05d0: 20 77 69 6e 33 32 2e 64 6c 67 73 3b 0a 70 75 62 win32.dlgs;.pub
05e0: 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 lic import win32
05f0: 2e 69 6d 6d 3b 0a 70 75 62 6c 69 63 20 69 6d 70 .imm;.public imp
0600: 6f 72 74 20 77 69 6e 33 32 2e 6c 7a 65 78 70 61 ort win32.lzexpa
0610: 6e 64 3b 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 nd;.public impor
0620: 74 20 77 69 6e 33 32 2e 6d 6d 73 79 73 74 65 6d t win32.mmsystem
0630: 3b 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 ;.public import
0640: 77 69 6e 33 32 2e 6e 62 33 30 3b 0a 0a 0a 0a 70 win32.nb30;....p
0650: 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e ublic import win
0660: 33 32 2e 72 70 63 3b 0a 70 75 62 6c 69 63 20 69 32.rpc;.public i
0670: 6d 70 6f 72 74 20 77 69 6e 33 32 2e 73 68 65 6c mport win32.shel
0680: 6c 61 70 69 3b 0a 70 75 62 6c 69 63 20 69 6d 70 lapi;.public imp
0690: 6f 72 74 20 77 69 6e 33 32 2e 77 69 6e 70 65 72 ort win32.winper
06a0: 66 3b 0a 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 f;.public import
06b0: 20 77 69 6e 33 32 2e 63 6f 6d 6d 64 6c 67 3b 0a win32.commdlg;.
06c0: 70 75 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 public import wi
06d0: 6e 33 32 2e 77 69 6e 73 70 6f 6f 6c 3b 0a 70 75 n32.winspool;.pu
06e0: 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 blic import win3
06f0: 32 2e 6f 6c 65 32 3b 0a 0a 2f 2f 20 53 65 6c 65 2.ole2;..// Sele
0700: 63 74 20 63 6f 72 72 65 63 74 20 76 65 72 73 69 ct correct versi
0710: 6f 6e 20 6f 66 20 77 69 6e 73 6f 63 6b 2e 20 20 on of winsock.
0720: 49 6d 70 6f 72 74 69 6e 67 20 74 68 65 20 69 6e Importing the in
0730: 63 6f 72 72 65 63 74 0a 2f 2f 20 6d 6f 64 75 6c correct.// modul
0740: 65 20 77 69 6c 6c 20 63 61 75 73 65 20 61 20 73 e will cause a s
0750: 74 61 74 69 63 20 61 73 73 65 72 74 20 74 6f 20 tatic assert to
0760: 70 72 65 76 65 6e 74 20 70 72 6f 62 6c 65 6d 73 prevent problems
0770: 20 6c 61 74 65 72 20 6f 6e 2e 0a 76 65 72 73 69 later on..versi
0780: 6f 6e 20 28 57 69 6e 33 32 5f 57 69 6e 73 6f 63 on (Win32_Winsoc
0790: 6b 31 29 20 7b 0a 09 70 75 62 6c 69 63 20 69 6d k1) {..public im
07a0: 70 6f 72 74 20 77 69 6e 33 32 2e 77 69 6e 73 6f port win32.winso
07b0: 63 6b 3b 0a 7d 20 65 6c 73 65 20 7b 0a 09 70 75 ck;.} else {..pu
07c0: 62 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 blic import win3
07d0: 32 2e 77 69 6e 73 6f 63 6b 32 3b 0a 09 70 75 62 2.winsock2;..pub
07e0: 6c 69 63 20 69 6d 70 6f 72 74 20 77 69 6e 33 32 lic import win32
07f0: 2e 77 73 32 74 63 70 69 70 3b 0a 7d 0a 0a 2f 2b .ws2tcpip;.}../+
0800: 0a 23 69 66 20 28 5f 57 49 4e 33 32 5f 57 49 4e .#if (_WIN32_WIN
0810: 4e 54 20 3e 3d 20 30 78 30 34 30 30 29 0a 23 69 NT >= 0x0400).#i
0820: 6e 63 6c 75 64 65 20 3c 77 69 6e 73 6f 63 6b 32 nclude <winsock2
0830: 2e 68 3e 0a 2f 2a 0a 20 2a 20 4d 53 20 6c 69 6b .h>./*. * MS lik
0840: 65 73 20 74 6f 20 69 6e 63 6c 75 64 65 20 6d 73 es to include ms
0850: 77 73 6f 63 6b 2e 68 20 68 65 72 65 20 61 73 20 wsock.h here as
0860: 77 65 6c 6c 2c 0a 20 2a 20 62 75 74 20 74 68 61 well,. * but tha
0870: 74 20 63 61 6e 20 63 61 75 73 65 20 75 6e 64 65 t can cause unde
0880: 66 69 6e 65 64 20 73 79 6d 62 6f 6c 73 20 69 66 fined symbols if
0890: 0a 20 2a 20 77 69 6e 73 6f 63 6b 32 2e 68 20 69 . * winsock2.h i
08a0: 73 20 69 6e 63 6c 75 64 65 64 20 62 65 66 6f 72 s included befor
08b0: 65 20 77 69 6e 64 6f 77 73 2e 68 0a 20 2a 2f 0a e windows.h. */.
08c0: 23 65 6c 73 65 0a 23 69 6e 63 6c 75 64 65 20 3c #else.#include <
08d0: 77 69 6e 73 6f 63 6b 2e 68 3e 0a 23 65 6e 64 69 winsock.h>.#endi
08e0: 66 20 2f 2a 20 20 28 5f 57 49 4e 33 32 5f 57 49 f /* (_WIN32_WI
08f0: 4e 4e 54 20 3e 3d 20 30 78 30 34 30 30 29 20 2a NNT >= 0x0400) *
0900: 2f 0a 2b 2f 0a /.+/.